cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7888
Views
30
Helpful
20
Replies

SIP incoming call, won't work (CME)

alig.norbert
Level 4
Level 4
Hi all, 

I'm facing a weird problem and the sip-provider can't help. I suppose there is a problem with the dial-peer/translation-rule but I can't figure it out...

There is a CME (c2800nm-ipvoice-mz.124-11.XW10.bin, CME Version 4.2(0)) with a
SIP trunk.

Outgoing calls are working (DID).
Incoming calls (all DID) are ringing on the same
internal number.

The situation:

- external  call on 0815440097 is ringing on the internal nr. 296 (should be 297)
- external call on 0815440096 is ringing on the internal nr. 296


Here the config:
================================
.....
voice service voip
allow-connections sip to sip
no supplementary-service sip moved-temporarily
no supplementary-service sip refer
sip
no update-callerid
....

voice translation-rule 40
rule 2 /\(.*\)/ /9\1/
!
voice translation-rule 190
rule 1 /^0\(.*\)/ /\1/
rule 2 /^9\(.*\)/ /\1/
!
voice translation-rule 191
rule 2 /296/ /0815440096/
rule 3 /297/ /0815440097/
!
voice translation-rule 192
rule 2 /^0815440097/ /297/
rule 3 /^0815440096/ /296/
...
voice translation-profile TP_IN_SIP
translate calling 40
translate called 192
!
voice translation-profile TP_OUT_SIP
translate calling 191
translate called 190
...
dial-peer voice 2000 voip
description *** SIP-TRUNK (IN/OUT) ***
translation-profile incoming TP_IN_SIP
translation-profile outgoing TP_OUT_SIP
destination-pattern 0.T
b2bua
session protocol sipv2
session target dns:sip12.e-fon.ch
session transport udp
incoming called-number 0815440096
dtmf-relay rtp-nte
codec g711alaw
no vad
...
sip-ua
credentials username 0815440096 password 7 xxxx realm sip12.e-fon.ch
keepalive target dns:sip12.e-fon.ch
authentication username 0815440096 password 7 xxxx
calling-info pstn-to-sip from number set 0815440096
no remote-party-id
retry invite 2
retry response 2
retry bye 2
retry register 2
retry options 1
registrar dns:sip12.e-fon.ch expires 69
sip-server dns:sip12.e-fon.ch
reason-header override
connection-reuse
host-registrar


sh sip-ua register status

Line                              peer        expires(sec)  registered

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

0815440096                        20005       18            yes


Here the CCSIP MESSAGE debug (looks ok):
(call from 0000000000 to 0815440097)
===============================
Mar  8 21:55:10.469 METD: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:
INVITE sip:0815440096@192.168.70.240:5060 SIP/2.0
Record-Route: <sip:212.55.198.132;lr=on;ftag=as00cd0e7f>
Via: SIP/2.0/UDP 212.55.198.132;branch=z9hG4bK49ff.2d35e30a71291ffe3895b39164900f36.0
Via: SIP/2.0/UDP 212.55.198.134:5061;branch=z9hG4bK1cb84749;rport=5061
Max-Forwards: 69
From: "0000000000" <sip:0000000000@212.55.198.134:5061>;tag=as00cd0e7f
To: <sip:0815440097@212.55.198.134:5060>
Contact: <sip:0000000000@212.55.198.134:5061>
Call-ID: 6916a3d913e4019538eb7c6442c4189f@212.55.198.134
CSeq: 102 INVITE
User-Agent: e-fon
Date: Thu, 08 Mar 2012 20:55:10 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
X-IPCONNECT: 0815440097
X-Number: 0815440097
Content-Type: application/sdp
Content-Length: 415

v=0
o=root 770254981 770254981 IN IP4 212.55.198.134
s=Asterisk PBX 1.6.1.20
c=IN IP4 212.55.198.134
t=0 0
m=audio 11886 RTP/AVP 8 9 111 3 18 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:3 GSM/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
Mar  8 21:55:10.481 METD: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Sent:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 212.55.198.132;branch=z9hG4bK49ff.2d35e30a71291ffe3895b39164900f36.0,
Via:SIP/2.0/UDP 212.55.198.134:5061;branch=z9hG4bK1cb84749;rport=5061
From: "0000000000" <sip:0000000000@212.55.198.134:5061>;tag=as00cd0e7f
To: <sip:0815440097@212.55.198.134:5060>
Date: Thu, 08 Mar 2012 20:55:10 GMT
Call-ID: 6916a3d913e4019538eb7c6442c4189f@212.55.198.134
Server: Cisco-SIPGateway/IOS-12.x
CSeq: 102 INVITE
Allow-Events: telephone-event
Content-Length: 0


Here is the VOICE DIAL-PEER debug (call from 0000000000 to 0815440097):
=============================================
Mar  8 22:00:09.498 METD: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
Calling Number=0815440096, Called Number=0815440096, Peer Info
Type=DIALPEER_INFO_SPEECH
Mar  8 22:00:09.498 METD: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
Match Rule=DP_MATCH_DEST; Called Number=0815440096
Mar  8 22:00:09.498 METD: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
Result=Success(0) after DP_MATCH_DEST
Mar  8 22:00:09.498 METD: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersMoreArg:
Result=SUCCESS(0)
List of Matched Outgoing Dial-peer(s):
1: Dial-peer Tag=20005
2: Dial-peer Tag=2000
Mar  8 22:00:09.498 METD: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:
Calling Number=0000000000, Called Number=, Voice-Interface=0x0,
Timeout=TRUE, Peer Encap Type=ENCAP_VOIP, Peer Search Type=PEER_TYPE_VOICE,
Peer Info Type=DIALPEER_INFO_SPEECH
Mar  8 22:00:09.498 METD: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:
Result=Success(0) after DP_MATCH_ORIGINATE; Incoming Dial-peer=2000
Mar  8 22:00:09.502 METD: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:
Calling Number=0000000000, Called Number=, Voice-Interface=0x0,
Timeout=TRUE, Peer Encap Type=ENCAP_VOIP, Peer Search Type=PEER_TYPE_VOICE,
Peer Info Type=DIALPEER_INFO_SPEECH
Mar  8 22:00:09.502 METD: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:
Result=Success(0) after DP_MATCH_ORIGINATE; Incoming Dial-peer=2000
Mar  8 22:00:09.502 METD: //-1/8647979A82E1/DPM/dpAssociateIncomingPeerCore:
Calling Number=0000000000, Called Number=0815440096, Voice-Interface=0x0,
Timeout=TRUE, Peer Encap Type=ENCAP_VOIP, Peer Search Type=PEER_TYPE_VOICE,
Peer Info Type=DIALPEER_INFO_SPEECH
Mar  8 22:00:09.502 METD: //-1/8647979A82E1/DPM/dpAssociateIncomingPeerCore:
Result=Success(0) after DP_MATCH_ORIGINATE; Incoming Dial-peer=2000
Mar  8 22:00:09.510 METD: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
Calling Number=0815440096, Called Number=0815440096, Peer Info
Type=DIALPEER_INFO_SPEECH
Mar  8 22:00:09.510 METD: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
Match Rule=DP_MATCH_DEST; Called Number=0815440096
Mar  8 22:00:09.510 METD: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
Result=Success(0) after DP_MATCH_DEST
Mar  8 22:00:09.510 METD: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersMoreArg:
Result=SUCCESS(0)
List of Matched Outgoing Dial-peer(s):
1: Dial-peer Tag=20006
2: Dial-peer Tag=2000
Mar  8 22:00:09.510 METD: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:
Calling Number=0815440096, Called Number=, Voice-Interface=0x0,
Timeout=TRUE, Peer Encap Type=ENCAP_VOIP, Peer Search Type=PEER_TYPE_VOICE,
Peer Info Type=DIALPEER_INFO_SPEECH
Mar  8 22:00:09.510 METD: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:
Result=Success(0) after DP_MATCH_ANSWER; Incoming Dial-peer=2000
Mar  8 22:00:09.514 METD: //-1/8647979A82E1/DPM/dpMatchPeersCore:
Calling Number=, Called Number=0815440096, Peer Info
Type=DIALPEER_INFO_SPEECH
Mar  8 22:00:09.514 METD: //-1/8647979A82E1/DPM/dpMatchPeersCore:
Match Rule=DP_MATCH_DEST; Called Number=0815440096
Mar  8 22:00:09.514 METD: //-1/8647979A82E1/DPM/dpMatchPeersCore:
Result=Success(0) after DP_MATCH_DEST
Mar  8 22:00:09.514 METD: //-1/8647979A82E1/DPM/dpMatchPeersMoreArg:
Result=SUCCESS(0)
List of Matched Outgoing Dial-peer(s):
1: Dial-peer Tag=20006
2: Dial-peer Tag=2000


show dial-peer voice summary:

dial-peer hunt 0
AD                                    PRE PASS                OUT

TAG    TYPE  MIN  OPER PREFIX    DEST-PATTERN      FER THRU SESS-TARGET    STAT
PORT
555    voip  up   up             555                0  syst loopback:rtp
20001  pots  up   up             296$               0                          50/0/1
20002  pots  up   up             297$               0                          50/0/2
2000   voip  up   up             0.T                0  syst dns:sip12.e-fon.ch
20005  pots  up   up             0815440096$        0                     50/0/150
20006  pots  up   up             0815440097$        9                     50/0/2

voip translation debugging (call from 0794142975 to 0815440097):

=========================================
Mar  8 22:35:26.145 METD: //-1/73E51DB2834F/RXRULE/regxrule_stack_pop_RegXruleNumInfo: stack=0x46FBFCA0; count=1

Mar  8 22:35:26.149 METD: //-1/73E51DB2834F/RXRULE/regxrule_stack_push_RegXruleNumInfo: stack=0x46FBFCA0; count=0

Mar  8 22:35:26.149 METD: //-1/73E51DB2834F/RXRULE/regxrule_profile_translate_internal: number=0794142975 type=unknown plan=unknown numbertype=calling

Mar  8 22:35:26.149 METD: //-1/73E51DB2834F/RXRULE/regxrule_profile_match_internal: Matched with rule 2 in ruleset 40

Mar  8 22:35:26.149 METD: //-1/73E51DB2834F/RXRULE/regxrule_profile_match_internal: Matched with rule 2 in ruleset 40

Mar  8 22:35:26.149 METD: //-1/73E51DB2834F/RXRULE/sed_subst: Successful substitution; pattern=0794142975 matchPattern=(.*) replacePattern=9\1 replaced pattern=90794142975

Mar  8 22:35:26.149 METD: //-1/73E51DB2834F/RXRULE/regxrule_subst_num_type: Match Type = none, Replace Type = none Input Type = unknown

Mar  8 22:35:26.149 METD: //-1/73E51DB2834F/RXRULE/regxrule_subst_num_plan: Match Plan = none, Replace Plan = none Input Plan = unknown

Mar  8 22:35:26.149 METD: //-1/73E51DB2834F/RXRULE/regxrule_profile_translate_internal: xlt_number=90794142975 xlt_type=unknown xlt_plan=unknown

Mar  8 22:35:26.149 METD: //-1/73E51DB2834F/RXRULE/regxrule_profile_translate_internal: number= type=unknown plan=unknown numbertype=redirect-called

Mar  8 22:35:26.149 METD: //-1/73E51DB2834F/RXRULE/regxrule_get_RegXrule: Invalid translation ruleset tag=0

Mar  8 22:35:26.149 METD: //-1/73E51DB2834F/RXRULE/regxrule_profile_match_internal: Error: ruleset for redirect-called number not found

Mar  8 22:35:26.149 METD: //-1/73E51DB2834F/RXRULE/regxrule_profile_translate_internal: No match: number= type=unknown plan=unknown

Mar  8 22:35:26.149 METD: //-1/73E51DB2834F/RXRULE/regxrule_profile_translate_internal: number=0815440096 type=unknown plan=unknown numbertype=called

Mar  8 22:35:26.149 METD: //-1/73E51DB2834F/RXRULE/regxrule_match: No match; number=0815440096 rule precedence=2

Mar  8 22:35:26.149 METD: //-1/73E51DB2834F/RXRULE/regxrule_match: No match; number=0815440096 rule precedence=3

Mar  8 22:35:26.149 METD: //-1/73E51DB2834F/RXRULE/regxrule_profile_match_internal: No match found

Mar  8 22:35:26.149 METD: //-1/73E51DB2834F/RXRULE/regxrule_profile_translate_internal: No match: number=0815440096 type=unknown plan=unknown

Mar  8 22:35:26.149 METD: //-1/73E51DB2834F/RXRULE/regxrule_stack_push_RegXruleNumInfo: stack=0x46FBFCA0; count=1

Mar  8 22:35:26.153 METD: //-1/73E51DB2834F/RXRULE/regxrule_dp_translate: No profile found in peer 20005 for outgoing direction

Mar  8 22:35:26.153 METD: //-1/73E51DB2834F/RXRULE/regxrule_dp_translate: calling_number=90794142975 calling_octet=0x0

        called_number=0815440096 called_octet=0x0

        redirect_number= redirect_type=0 redirect_plan=0        redirect_PI=-1 redirect_SI=-1

Mar  8 22:35:26.181 METD: //-1/73E51DB2834F/RXRULE/regxrule_stack_pop_RegXruleNumInfo: stack=0x46FBFCA0; count=2

Thanks,

Norbert

20 Replies 20

Having researched this issue,  I came across this thread online..

There is no way for CCME/CUCM to route calls based on TO field. You can use TCL scripts but be mindful it can cause other issues. Your best bet is to speak to your provider to see if they can modify the Request-URI field to match the TO field

I just worked with the CUBE BU, CUSP BU, Cisco Advanced Services, TAC, and my Channel SE team about this.

Bottom line, CUBE and CUCM cannot route on the TO field.

We ran into the same issue. Telco wanted to send a generic request-URI and have us route on the TO field. The Cisco Unified Sip Proxy server can do this. However, CUBE, CUCM, CVP etc. cannot. And yes, I did get my hands on a TCL script for CUBE, which worked on the inbound to replace the Request-URI with the TO field so everything else would work. BUT, we ran into other issues.



For example, when routing to a busy phone or a non-registered phone, the SIP messages would die at CUBE. CUBE with the TCL script would not pass them back to the SIP Proxy or back to the Telco. Cisco said that the TCL script (which they provided) is not supported and that I needed to engage development to come up with a script that will take into consideration all the SIP Messages.

Also, neither CUSP, CUBE, nor CUCM can replace the Request-URI with the value in the TO field.

The telco did come through with a way that they can replace the Request-URI with the DNIS when routing calls in. Hooray for Verizon.



Please rate all useful posts

"opportunity is a haughty goddess who waste no time with those who are unprepared"

Please rate all useful posts

The problem is, the IOS gateway use the INVITE sip tag to do the call routing, as is part of the SIP RFC. Only a SIP normalisation (copy the TO: or P-preferd tag to INVITE)will help.
For the CUCM-IOS gateway-SIP you can upgrade the gateway with a CUBE license and do the normalisation or wait for the TCL script mention above.

Sent from Cisco Technical Support iPad App

alig.norbert
Level 4
Level 4

I would be intersted, because I had to move to another SIP provider :-(

Sent from Cisco Technical Support iPhone App

daniel.bloom
Level 1
Level 1

Attached is my TCL script that allows CME to route calls based on the SIP TO header.

Hi, Daniel.

Thanks for TCL script.

But I asked my SP to change scheme from sip-ua registration to sip trunk with auth by ip address.

After this change incoming calls started to come with correct number in INVITE sip tag.

So now gateway routes these calls correctly.

Thanks everybody for help and recomendations.

Good luck.

Hi Daniel,


thank you a lot for your TCL script. We had the same issue with our UC560 and SP.
We appreciated so much your help.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: