User Tools

Site Tools


eduardo:cisco:cucm:sip-gw

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
eduardo:cisco:cucm:sip-gw [2010/09/25 00:38] eduardoeduardo:cisco:cucm:sip-gw [2024/02/23 08:20] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== SIP Gateway ======
 +  * SIP trunk is limited to the used of codec
 +  * All media to/from SIP trunk is terminate on MTP
 +
 +===== Gateway =====
 +  * Configure source interface for SIP messages
 +<code>
 +voice service voip
 +  sip
 +    bind all source-interface Fa0/0.20
 +</code>
 +
 +  * Reduce timer for faster failover
 +    * Send SIP invite 3 times max (1 initial + 2 retries)
 +    * Wait 300ms for each trying
 +<code>
 +sip-ua
 +  retry invite 2
 +  timers trying 300
 +</code>
 +
 +  * Configure Dial Peer
 +<code>
 +dial-peer voice 1 voip
 +  destination-pattern 212394...
 +  session protocol sipv2
 +  session target ipv4:<cucm-sub>
 +  voice-class codec 1
 +  dtmf-relay rtp-nte
 +  no vad
 +</code>
 +
 +===== Debug =====
 +  * Display active call inbound and outbound dial peer
 +  * In the example below
 +    * pid:5000 = inbound dial peer 5000
 +    * pid:91212 = outbound dial peer 91212
 +<code>
 +Router# show call active voice brief
 +...
 +Telephony call-legs: 1
 +SIP call-legs: 1
 +H323 call-legs: 0
 +Call agent controlled call-legs: 0
 +SCCP call-legs: 0
 +Multicast call-legs: 0
 +Total call-legs: 2
 +1383 : 280 920799800ms.1 +1960 pid:5000 Answer 2123945001 active
 + dur 00:00:06 tx:343/54880 rx:343/54880
 + IP 192.168.100.205:24598 SRTP: off rtt:35ms pl:4850/0ms lost:0/1/0 delay:55/55/75ms g711ulaw TextRelay: off
 + media inactive detected:n media contrl rcvd:n/a timestamp:n/a
 + long duration call detected:n long duration call duration:n/a timestamp:n/a
 +1383 : 281 920799830ms.1 +1930 pid:91212 Originate 912123942123 active
 + dur 00:00:06 tx:344/57792 rx:442/70720
 + Tele 0/0/0:23 (281) [0/0/0.10] tx:6870/6870/0ms g711ulaw noise:-66 acom:40  i/0:-66/-39 dBm
 +
 +Telephony call-legs: 1
 +SIP call-legs: 1
 +H323 call-legs: 0
 +Call agent controlled call-legs: 0
 +SCCP call-legs: 0
 +Multicast call-legs: 0
 +Total call-legs: 2
 +
 +Router#
 +</code>
 +
 +  * Real time display of dialpeer matching
 +<code>
 +Router# debug voip dialpeer
 +...
 +Sep 25 00:35:55.963: //-1/B19F88CA81AA/DPM/dpAssociateIncomingPeerCore:
 +   Calling Number=2123945001, Called Number=912123942123, Voice-Interface=0x0,
 +   Timeout=TRUE, Peer Encap Type=ENCAP_VOIP, Peer Search Type=PEER_TYPE_VOICE,
 +   Peer Info Type=DIALPEER_INFO_SPEECH
 +Sep 25 00:35:55.963: //-1/B19F88CA81AA/DPM/dpAssociateIncomingPeerCore:
 +   Result=Success(0) after DP_MATCH_ORIGINATE; Incoming Dial-peer=5000
 +Sep 25 00:35:55.967: //-1/B19F88CA81AA/DPM/dpMatchPeersCore:
 +   Calling Number=, Called Number=912123942123, Peer Info Type=DIALPEER_INFO_SPEECH
 +Sep 25 00:35:55.967: //-1/B19F88CA81AA/DPM/dpMatchPeersCore:
 +   Match Rule=DP_MATCH_DEST; Called Number=912123942123
 +Sep 25 00:35:55.967: //-1/B19F88CA81AA/DPM/dpMatchPeersCore:
 +   Result=Success(0) after DP_MATCH_DEST
 +Sep 25 00:35:55.967: //-1/B19F88CA81AA/DPM/dpMatchPeersMoreArg:
 +   Result=SUCCESS(0) 
 +   List of Matched Outgoing Dial-peer(s): 
 +     1: Dial-peer Tag=91212
 +...
 +Router# 
 +</code>
 +
 +  * Debug SIP messages
 +<code>
 +Router# debug ccsip messages
 +
 +Sep 25 00:37:27.924: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
 +Received: 
 +INVITE sip:912123942123@10.80.103.1:5060 SIP/2.0
 +Date: Sat, 25 Sep 2010 00:37:27 GMT
 +Call-Info: <sip:10.80.101.72:5060>;method="NOTIFY;Event=telephone-event;Duration=500"
 +Allow: INVITE, OPTIONS, INFO, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY
 +From: "Hub CIPC" <sip:2123945001@10.80.101.72>;tag=7d2b5333-55a2-4a50-8e9e-054166bd5774-56445489
 +Allow-Events: presence, kpml
 +P-Asserted-Identity: "Hub CIPC" <sip:2123945001@10.80.101.72>
 +Supported: timer,resource-priority,replaces
 +Min-SE:  1800
 +Remote-Party-ID: "Hub CIPC" <sip:2123945001@10.80.101.72>;party=calling;screen=yes;privacy=off
 +Content-Length: 0
 +User-Agent: Cisco-CUCM7.0
 +To: <sip:912123942123@10.80.103.1>
 +Contact: <sip:2123945001@10.80.101.72:5060;transport=tcp>
 +Expires: 180
 +Call-ID: 11150300-c9d14447-e13-4865500a@10.80.101.72
 +Via: SIP/2.0/TCP 10.80.101.72:5060;branch=z9hG4bK6a4ccd9a10
 +CSeq: 101 INVITE
 +Session-Expires:  1800
 +Max-Forwards: 70
 +
 +Sep 25 00:37:27.932: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
 +Sent: 
 +SIP/2.0 100 Trying
 +Date: Sat, 25 Sep 2010 00:37:27 GMT
 +From: "Hub CIPC" <sip:2123945001@10.80.101.72>;tag=7d2b5333-55a2-4a50-8e9e-054166bd5774-56445489
 +Allow-Events: telephone-event
 +Content-Length: 0
 +To: <sip:912123942123@10.80.103.1>
 +Call-ID: 11150300-c9d14447-e13-4865500a@10.80.101.72
 +Via: SIP/2.0/TCP 10.80.101.72:5060;branch=z9hG4bK6a4ccd9a10
 +CSeq: 101 INVITE
 +Server: Cisco-SIPGateway/IOS-12.x
 +
 +Router# 
 +</code>