Thursday 15 November 2012

SIP trunking - part 1

Recently we implemented a Vodafone SIP trunk at our office. The Vodafone setup consists of a fiberswitch and a Cisco 2901 CUBE (Cisco Unified Border Element). Normally the CUBE connects directly to a Cisco Unified Communication Manager (CUCM) but we connected it to our own CUBE mainly because of 3 reasons:
  • our own CUBE enables us to control the way it talks tot the CUCM
  • we need SRST on the CUBE because the SIP-trunk is not located at the CUCM-site.
  • it's also the prefered way to do it  
The first thing we had to think about is: how do we connect to our CUCM? SIP or H.323? We went for SIP, also because we wanted to stay as close to the suggested setup in the Vodafone-documentation.



Globally this is our setup:


If you want to implement in this way also be sure to remember you have to give Vodafone the ip address of the CUBE and not the CUCM.

Note : Vodafone uses a public address on a loopback interface in the CUBE. That's the ip address you use in your dial-peers.

IP adresses (fictional):

Vodafone CUBE internal  :  10.2.50.2
Vodafone CUBE loopback  :  62.63.64.65
CUBE internal           :  10.2.50.1
CUCM 1                  :  10.1.50.1
CUCM 2                  :  10.1.50.2

Step 1 - do some basic networking config

Interface Gi0/0
 ip address 10.2.50.1 255.255.255.0
!
ip route 62.62.64.65 255.255.255.0 10.2.50.2
!

Step 2 - enable SIP on the CUBE

voice call send-alert
voice rtp send-recv
!
voice service voip
 allow-connections sip to sip
 redirect ip2ip
 fax protocol pass-through g711alaw


=== we added H.323 statements also ===

 allow-connections h323 to h323
 allow-connections h323 to sip
 allow-connections sip to h323
 allow-connections sip to sip
 no supplementary-service h450.2
 no supplementary-service h450.3
 no supplementary-service h450.7
 supplementary-service h450.12

 h323
 sip
  bind control source-interface Gi0/0
  bind media source-interface Gi0/0
  rel1xx disable
  header-passing
  error-passthru
  asserted-id pai
  options-ping 90
  early-offer forced
  midcall-signaling passthru
 

=== the following command are 15.x and up only ===

  privacy-policy passthru
  pass-thru headers unsupp
  pass-thru content unsupp
!


sip-ua
 timers trying 1000
 timers expires 250000
!

Step 3 - select your codecs

Vodafone uses g.711 a-law

voice class codec 1
 codec preference 1 g711alaw
 codec preference 2 g711ulaw
 codec preference 3 g729r8


Step 4 - create dial-peers


The following 2 dial-peers will allow call coming in and going out

dial-peer voice 1 voip
 description === SIP OUT to VD CUBE ===
 huntstop
 preference 1
 destination-pattern 0T
 signaling forward unconditional
 session protocol sipv2
 session target ipv4:62.63.64.65
 voice-class codec 1
 dtmf-relay rtp-nte
 no vad
!
dial-peer voice 101 voip
 description === SIP IN to CUCM ===
 huntstop
 preference 1
 destination-pattern 01239876..
 session protocol sipv2
 session target ipv4:10.1.50.1
 voice-class codec 1
 dtmf-relay rtp-nte
 no vad
!

This is where part 1 ends. There's still quite a to-do list:

  • Create a SIP-trunk on the CUCM(-cluster)
  • Add the national dialing plan to the CUBE, this cuts down the interdigit timer. There's a quick way to do this with CCP.
  • Add dial-peer failover because we have a cluster and not a stand-alone CUCM.
  • Setup Transcoder/MTP resources
  • Configure SRST

It'll keep me busy for a while :-). In the next part I'll show you how to create a SIP-trunk between the CUBE and the CUCM and how to add a national dial-plan to the CUBE.

No comments:

Post a Comment