cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2251
Views
5
Helpful
8
Replies

Confused by basic SIP Trunk configuration.

Mike Bowers
Level 1
Level 1

I've went through a few basic SIP trunk configurations and Youtube videos the last couple days but can't figure out what I'm doing wrong.

 

I've set up H323 and MGCP no problem, but I can't figure out the SIP trunk set up. I'm guessing there are some concepts I'm not understanding yet.

 

I've got a CUCM lab set up. A 2851 PSTN Simulator, 2851 H323 Gateway at the Main site with a 9.0 CUCM setup in that site and a Branch site that I'm trying to set up as a SIP trunk to connect two phones.

 

CUCM is on the 192.168.5.x/24 subnet. 172.16.0.x/24 is the subnet connecting the serial(internet) cable between the two gateways in which I'm trying to establish the trunk between.

 

The Branch phones are still registering with the CUCM at the main site. The Route Pattern is looking to the Branch Route List which has the SIP Trunk listed. I'm just getting a fast busy when trying to place a call from the branch site to the main site.

 

The most frustrating thing I'm not understanding, is that the debug ccsip and call debugs on my SIP Branch gateway shows absolutely nothing.  I've tried registering the branch phones with the SIP Trunk, but stopped when I figured that shouldn't be necessary.

 

If someone can make some sense of this, I'd truly appreciate it!

 

 

1 Accepted Solution

Accepted Solutions

Hi Harvey

 

Since you are facing codec negotiation problem, instead of using single codec on the dial-peers, i would suggest you to create a codec class and call them under dial-peers

Create the following codec class

 

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

 

call this under both your dial-peers using following command:

 

voice-class codec 1

 

This gives u the option of negotiating multiple dial-peers in case 1 is not supported.

also under your dial-peer 1 use:

incoming called number .

 

If you are still facing problem with call negotiation enable following debug

 

debug ccsip message

 

then make a test call and print the output here.

 

Regards

Aditya Gupta

 

View solution in original post

8 Replies 8

Aditya Gupta
Cisco Employee
Cisco Employee

Hi Harvey

When you say branch site phones are registering to the main CUCM, so going by that statement all your phones are registering to the CUCM at main site ? Or Am i missing point where in you have two branch sites or something ?

 

If Statement 1 is true, then why do you need SIP or any other trunk or G/W to place calls between those phones since they all are registering to the same CUCM . You can dial the extensions directly if the phones are registered to the same cluster, all you need is network connectivity.

 

But then again, looking at your router config , i also saw telephony service and ephone commands.

Can you explain the network diagram/scenario in a bit more details

 

Just in case you are registering your phones to the CME at branch site, check the following

 

1. 172.16.0.1 can be directly pinged from CUCM and vice versa

2. IP address mentioned on the outbound dial-peer is one of the CUCM servers on device pool of sip trunk on cucm cluster

3.  "allow connections" command under voice service voip

4. Bind sip traffic to an interface under voice service voip -->Sip

 

 

 

 

 

Regards

Aditya Gupta

 

 

Hello Aditya and thanks for the consideration!

 

I do have a direct IP connection, but I want to set up a SIP trunk and use it just to know how to do it before I do it in production. 

 

I did end up deleting the phones from CUCM so they can register with the 2851 CME that I'm setting up as a SIP trunk. So it is registering there, and I set the allow connections and bind sip commands.

 

I am now getting Debugs and calls from the SIP Trunk router going to CUCM, but the error message is No Codec, and I Get the fast busy after the call rings on the CUCM Main Site side. So looks like the negotiation is failing. Here is my CLI for the SIP Trunk now after the changes have been made and phones registered to the SIP Branch site as well as the Debug when I tried to place a call to extension "5000":

 

Note: I did try to change the codecs in the dial-peers to g729r8 instead of 711 and same fast busy after answering.

==============================================

Branch_SIP#show run
Building configuration...


Current configuration : 3529 bytes
!
! Last configuration change at 03:15:11 UTC Thu Apr 2 2015
version 15.1
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Branch_SIP
!
boot-start-marker
boot-end-marker
!
!
! card type command needed for slot/vwic-slot 0/2
enable secret 5 $1$hOXF$gvfmWW1ZIQE0mAMVg.u1c/
!
no aaa new-model
!
!
dot11 syslog
ip source-route
!
!
ip cef
!
ip dhcp excluded-address 10.0.10.1 10.0.10.10
ip dhcp excluded-address 10.0.30.1 10.0.30.10
!
ip dhcp pool Data
 network 10.0.10.0 255.255.255.0
 default-router 10.0.10.254
 option 150 ip 192.168.5.250
 dns-server 192.168.5.200
!
ip dhcp pool Voice
 network 10.0.30.0 255.255.255.0
 default-router 10.0.30.254
 dns-server 192.168.5.200
 option 150 ip 172.16.0.1
!
ip dhcp pool data
 option 150 ip 172.16.0.2
!
!
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
voice service voip
 allow-connections sip to sip
 sip
  bind media source-interface Loopback1
!
!
!
!
!
voice-card 0
!
crypto pki token default removal timeout 0
!
!
!
!
license udi pid CISCO2851 sn FTX1031A2FM
!
redundancy
!
!
!
!
!
!
!
!
!
!
interface Loopback1
 ip address 2.2.2.2 255.255.255.255
!
interface GigabitEthernet0/0
 no ip address
 duplex auto
 speed auto
!
interface GigabitEthernet0/0.10
 encapsulation dot1Q 10
 ip address 10.0.10.254 255.255.255.0
!
interface GigabitEthernet0/0.30
 encapsulation dot1Q 30
 ip address 10.0.30.254 255.255.255.0
!
interface GigabitEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/3/0
 no ip address
 shutdown
 clock rate 2000000
!
interface Serial0/3/1
 ip address 172.16.0.1 255.255.255.0
 clock rate 250000
!
interface Internal-Service-Module0/0
 no ip address
 shutdown
 !Application: CUE Running on AIM2
 hold-queue 512 out
!
!
router eigrp 1
 network 0.0.0.0
 network 2.2.2.2 0.0.0.0
 network 10.0.0.0
 network 10.0.10.0 0.0.0.255
 network 10.0.30.0 0.0.0.255
 network 172.16.0.0
!
ip forward-protocol nd
no ip http server
no ip http secure-server
!
!
ip route 0.0.0.0 0.0.0.0 172.16.0.2
!
!
!
!
!
!
tftp-server flash:term45.default.loads
tftp-server flash:jar45sccp.8-5-3TH1-6.sbn
tftp-server flash:cnu45.8-5-3TH1-6.sbn
tftp-server flash:apps45.8-5-3TH1-6.sbn
tftp-server flash:dsp45.8-5-3TH1-6.sbn
tftp-server flash:cvm45sccp.8-5-3TH1-6.sbn
!
control-plane
!
!
voice-port 0/0/0
!
voice-port 0/0/1
!
!
!
mgcp profile default
!
!
dial-peer voice 1 voip
 description **Incoming Call from SIP Trunk**
 session protocol sipv2
 session target sip-server
 codec g711ulaw
!
dial-peer voice 2 voip
 description **Outgoing Call to SIP Trunk**
 destination-pattern 5...
 session protocol sipv2
 session target sip-server
 codec g711ulaw
!
!
sip-ua
 sip-server ipv4:192.168.5.250
!
!
!
telephony-service
 codec g711ulaw
 max-ephones 24
 max-dn 48
 ip source-address 172.16.0.1 port 2000
 system message SIP Branch Site
 cnf-file location flash:
 load 7960-7940 P00308010200.bin
 max-conferences 8 gain -6
 transfer-system full-consult
!
!
ephone-dn  1
 number 4008
!
!
ephone-dn  2
 number 4005
!
!
ephone  1
 device-security-mode none
 mac-address 001D.A21A.2065
 button  1:1
!
!
!
!
line con 0
 exec-timeout 0 0
line aux 0
line 194
 no activation-character
 no exec
 transport preferred none
 transport input all
 transport output lat pad telnet rlogin lapb-ta mop udptn v120 ssh
 stopbits 1
 speed 115200
line vty 0 4
 password cisco
 login
 transport input all
line vty 5 15
 password cisco
 login
 transport input all
!
scheduler allocate 20000 1000
end

Branch_SIP#show debug


TFTP:
  TFTP Event debugging is on
CCSIP SPI: SIP Call Statistics tracing is enabled       (filter is OFF)

 

Branch_SIP#
*Apr  2 03:20:32.351: //25/0C496935804A/SIP/Call/sipSPICallInfo:
The Call Setup Information is:
Call Control Block (CCB) : 0x4B6C5C28
State of The Call        : STATE_DEAD
TCP Sockets Used         : NO
Calling Number           : 4008
Called Number            : 5005
Source IP Address (Sig  ): 172.16.0.1
Destn SIP Req Addr:Port  : 192.168.5.250:5060
Destn SIP Resp Addr:Port : 192.168.5.250:5060
Destination Name         : 192.168.5.250

*Apr  2 03:20:32.351: //25/0C496935804A/SIP/Call/sipSPIMediaCallInfo:
Number of Media Streams: 1
Media Stream             : 1
Negotiated Codec         : No Codec
Negotiated Codec Bytes   : 0
Nego. Codec payload      : 255 (tx), 255 (rx)
Negotiated Dtmf-relay    : 0
Dtmf-relay Payload       : 0 (tx), 0 (rx)
Source IP Address (Media): 2.2.2.2
Source IP Port    (Media): 19472
Destn  IP Address (Media):  -
Destn  IP Port    (Media): 0
Orig Destn IP Address:Port (Media): [ - ]:0

*Apr  2 03:20:32.351: //25/0C496935804A/SIP/Call/sipSPICallInfo:
Disconnect Cause (CC)    : 63
Disconnect Cause (SIP)   : 503

Branch_SIP#

Hi Harvey

 

Since you are facing codec negotiation problem, instead of using single codec on the dial-peers, i would suggest you to create a codec class and call them under dial-peers

Create the following codec class

 

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

 

call this under both your dial-peers using following command:

 

voice-class codec 1

 

This gives u the option of negotiating multiple dial-peers in case 1 is not supported.

also under your dial-peer 1 use:

incoming called number .

 

If you are still facing problem with call negotiation enable following debug

 

debug ccsip message

 

then make a test call and print the output here.

 

Regards

Aditya Gupta

 

Hello Aditya, thanks again for keeping with me on this

 

Here is the new config after the above changes. After the configuration, I debugged ccsip and placed a test call from 4008(Branch SIP site) to 5000, and then tried to place another call back from 5000 to 4008 with the 4XXX Route pattern pointing out the SIP Trunk. Looks like the SIP CME is trying to send and receive calls but fast busy and "No Codec" error


Branch_SIP#show run
Building configuration...


Current configuration : 3704 bytes
!
! Last configuration change at 23:38:40 UTC Thu Apr 2 2015
version 15.1
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Branch_SIP
!
boot-start-marker
boot-end-marker
!
!
! card type command needed for slot/vwic-slot 0/2
enable secret 5 $1$hOXF$gvfmWW1ZIQE0mAMVg.u1c/
!
no aaa new-model
!
!
dot11 syslog
ip source-route
!
!
ip cef
!
ip dhcp excluded-address 10.0.10.1 10.0.10.10
ip dhcp excluded-address 10.0.30.1 10.0.30.10
!
ip dhcp pool Data
 network 10.0.10.0 255.255.255.0
 default-router 10.0.10.254
 option 150 ip 192.168.5.250
 dns-server 192.168.5.200
!
ip dhcp pool Voice
 network 10.0.30.0 255.255.255.0
 default-router 10.0.30.254
 dns-server 192.168.5.200
 option 150 ip 172.16.0.1
!
ip dhcp pool data
 option 150 ip 172.16.0.2
!
!
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
voice service voip
 allow-connections sip to sip
 sip
  bind media source-interface Loopback1
!
voice class codec 1
 codec preference 1 g711ulaw
 codec preference 2 g711alaw
 codec preference 3 g729r8
 codec preference 4 g729br8
!
!
!
!
!
voice-card 0
!
crypto pki token default removal timeout 0
!
!
!
!
license udi pid CISCO2851 sn FTX1031A2FM
!
redundancy
!
!
!
!
!
!
!
!
!
!
interface Loopback1
 ip address 2.2.2.2 255.255.255.255
!
interface GigabitEthernet0/0
 no ip address
 duplex auto
 speed auto
!
interface GigabitEthernet0/0.10
 encapsulation dot1Q 10
 ip address 10.0.10.254 255.255.255.0
!
interface GigabitEthernet0/0.30
 encapsulation dot1Q 30
 ip address 10.0.30.254 255.255.255.0
!
interface GigabitEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/3/0
 no ip address
 shutdown
 clock rate 2000000
!
interface Serial0/3/1
 ip address 172.16.0.1 255.255.255.0
 clock rate 250000
!
interface Internal-Service-Module0/0
 no ip address
 shutdown
 !Application: CUE Running on AIM2
 hold-queue 512 out
!
!
router eigrp 1
 network 0.0.0.0
 network 2.2.2.2 0.0.0.0
 network 10.0.0.0
 network 10.0.10.0 0.0.0.255
 network 10.0.30.0 0.0.0.255
 network 172.16.0.0
!
ip forward-protocol nd
no ip http server
no ip http secure-server
!
!
ip route 0.0.0.0 0.0.0.0 172.16.0.2
!
!
!
!
!
!
tftp-server flash:term45.default.loads
tftp-server flash:jar45sccp.8-5-3TH1-6.sbn
tftp-server flash:cnu45.8-5-3TH1-6.sbn
tftp-server flash:apps45.8-5-3TH1-6.sbn
tftp-server flash:dsp45.8-5-3TH1-6.sbn
tftp-server flash:cvm45sccp.8-5-3TH1-6.sbn
!
control-plane
!
!
voice-port 0/0/0
!
voice-port 0/0/1
!
!
!
mgcp profile default
!
!
dial-peer voice 1 voip
 description **Incoming Call from SIP Trunk**
 session protocol sipv2
 session target sip-server
 incoming called-number .
 voice-class codec 1
!
dial-peer voice 2 voip
 description **Outgoing Call to SIP Trunk**
 destination-pattern 5...
 session protocol sipv2
 session target sip-server
 voice-class codec 1
!
!
sip-ua
 sip-server ipv4:192.168.5.250
!
!
!
telephony-service
 codec g711ulaw
 max-ephones 24
 max-dn 48
 ip source-address 172.16.0.1 port 2000
 system message SIP Branch Site
 cnf-file location flash:
 load 7960-7940 P00308010200.bin
 max-conferences 8 gain -6
 transfer-system full-consult
!
!
ephone-dn  1
 number 4008
!
!
ephone-dn  2
 number 4005
!
!
ephone  1
 device-security-mode none
 mac-address 001D.A21A.2065
 button  1:1
!
!
!
!
line con 0
 exec-timeout 0 0
line aux 0
line 194
 no activation-character
 no exec
 transport preferred none
 transport input all
 transport output lat pad telnet rlogin lapb-ta mop udptn v120 ssh
 stopbits 1
 speed 115200
line vty 0 4
 password cisco
 login
 transport input all
line vty 5 15
 password cisco
 login
 transport input all
!
scheduler allocate 20000 1000
end

Branch_SIP#
*Apr  2 23:42:26.579: //28/BFE8C2E78058/SIP/Call/sipSPICallInfo:
The Call Setup Information is:
Call Control Block (CCB) : 0x4B6C2CF0
State of The Call        : STATE_DEAD
TCP Sockets Used         : NO
Calling Number           : 4008
Called Number            : 5000
Source IP Address (Sig  ): 172.16.0.1
Destn SIP Req Addr:Port  : 192.168.5.250:5060
Destn SIP Resp Addr:Port : 192.168.5.250:5060
Destination Name         : 192.168.5.250

*Apr  2 23:42:26.579: //28/BFE8C2E78058/SIP/Call/sipSPIMediaCallInfo:
Number of Media Streams: 1
Media Stream             : 1
Negotiated Codec         : No Codec
Negotiated Codec Bytes   : 0
Nego. Codec payload      : 255 (tx), 255 (rx)
Negotiated Dtmf-relay    : 0
Dtmf-relay Payload       : 0 (tx), 0 (rx)
Source IP Address (Media): 2.2.2.2
Source IP Port    (Media): 16628
Destn  IP Address (Media):  -
Destn  IP Port    (Media): 0
Orig Destn IP Address:Port (Media): [ - ]:0

*Apr  2 23:42:26.579: //28/BFE8C2E78058/SIP/Call/sipSPICallInfo:
Disconnect Cause (CC)    : 63
Disconnect Cause (SIP)   : 503

Branch_SIP#
Branch_SIP#
Branch_SIP#
Branch_SIP#
*Apr  2 23:42:40.483: //29/DCAB85800000/SIP/Call/sipSPICallInfo:
The Call Setup Information is:
Call Control Block (CCB) : 0x4B6C86E8
State of The Call        : STATE_DEAD
TCP Sockets Used         : NO
Calling Number           : 5000
Called Number            : 4008
Source IP Address (Sig  ): 172.16.0.1
Destn SIP Req Addr:Port  : 192.168.5.250:5060
Destn SIP Resp Addr:Port : 192.168.5.250:5060
Destination Name         : 192.168.5.250

*Apr  2 23:42:40.483: //29/DCAB85800000/SIP/Call/sipSPIMediaCallInfo:
Number of Media Streams: 1
Media Stream             : 1
Negotiated Codec         : No Codec
Negotiated Codec Bytes   : 0
Nego. Codec payload      : 255 (tx), 255 (rx)
Negotiated Dtmf-relay    : 0
Dtmf-relay Payload       : 0 (tx), 0 (rx)
Source IP Address (Media): 2.2.2.2
Source IP Port    (Media): 19100
Destn  IP Address (Media):  -
Destn  IP Port    (Media): 0
Orig Destn IP Address:Port (Media): [ - ]:0

*Apr  2 23:42:40.483: //29/DCAB85800000/SIP/Call/sipSPICallInfo:
Disconnect Cause (CC)    : 21
Disconnect Cause (SIP)   : 403

 

Success!

I looked up the error codes for outbound calls and the reason why the outbound calls were not going through was because when I was binding to the loopback I only had "  bind media source-interface Loopback1" and not   "bind control source-interface Loopback1".

After that, outbound calls worked.

 

Inbound calls were still failing, however, and it turned out to be the tollfraud app was blocking them. I had to configure the trusted list:

voice service voip

 ip address trusted list

ipv4 0.0.0.0 0.0.0.0 (allow all)
 

After that, inbound calls were working too! Thank you, Aditya, for your time and helping me come to this conclusion. I really appreciate it!

Hi Harvey

 

Thanks for sharing back the solution on the forum.

Great to know the calls worked.

 

Regards

Aditya Gupta

 

Hi Harvey Crocker,

 it's very important to use the Toll Fraud Prevention app, try this:

 

voice service voip
 ip address trusted authenticate
 ipv4 192.168.5.250 255.255.255.255
 ipv4 172.16.0.1 255.255.255.255
 ipv4 10.0.30.0 255.255.255.0

 

Hope this helps.

Thanks for the solutions,

It works 

 

voice service voip

ip address trusted list

ipv4 0.0.0.0 0.0.0.0