cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
420
Views
0
Helpful
3
Replies

CME Sip user account called number in user part of header To how to get it

egiovannetti
Level 1
Level 1


Hi all,

I have a problem routing inbound Sip calls to correct extensions in this scenario:


- Cisco 2921 CME IOS vers.15.4(2)T, CME version 10.0

- Sip User agent registered to provider:
sip-ua
 credentials username 5406031279 password 7 xxxxxxxxxxxxxxxxx realm messagenet.it
 authentication username 5406031279 password 7 xxxxxxxxxxxxxxxxxx
 no remote-party-id
 retry invite 4
 retry response 3
 retry bye 2
 retry cancel 2
 retry register 5
 timers register 200
 registrar dns:sip.messagenet.it:5060 expires 300
 sip-server dns:sip.messagenet.it
 notify telephone-event max-duration 3000
 connection-reuse
 host-registrar
!

- Bound to the above Uri (5406031279) are several public numbers (i.e. 0292969101 etc.)

translation rules and incoming dial peer, are currently set as follow, because provider pass me the URI on the field "To"
and pass the public number in the userpart of the header "To"

!
voice translation-rule 4
 rule 1 /^\(.*\)/ /0\1/
!
!
voice translation-rule 7
 rule 1 /5406031279/ /399/
!
!
voice translation-profile RENUM-IN-PROVV
 translate calling 4
 translate called 7
!


dial-peer voice 1000 voip
 description TRUNK SIP KPN
 translation-profile incoming RENUM-IN-PROVV
 translation-profile outgoing profile1
 destination-pattern 0T
 redirect ip2ip
 session protocol sipv2
 session target dns:sip.messagenet.it
 incoming called-number .%
 voice-class codec 2 
 dtmf-relay rtp-nte
 no vad
!

In this case, calls to all numbers, all go to dial peer 399 that lead to a voice hunt group.

what I want to do is to be able to read the content of userpart of header "To" and
implement a rule or something that allow me to reach the extension directly.

an ephone-dn as example is:
!
ephone-dn  11  dual-line
 number 0292969100 secondary 200 no-reg both
 pickup-group 1
 label 200.Monica
 description 200.Monica
 name +390292969100
 call-forward noan 401 timeout 30
 hold-alert 30 originator
!

thanks a lot in advance

Emanuele

3 Replies 3

James Hawkins
Level 8
Level 8

Hi,

Can you post a "debug ccsip messages" of the SIP call so that we can see exactly what the provider is sending you.

Hi James,

this is debug ccsip messages you asked me for, calling number is +393484160884 and I've called +390292969196.

thanks a lot


Jan 19 15:34:45.121: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:
...
Jan 19 15:34:47.145: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:

Jan 19 15:34:56.457: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:
INVITE sip:5406031279@100.68.23.82:5060 SIP/2.0

Record-Route: <sip:212.97.59.76;lr=on;ftag=as71dbda44;rpp=np>

Via: SIP/2.0/UDP 212.97.59.76;branch=z9hG4bKcabe.857f13e7.0

Via: SIP/2.0/UDP 193.227.104.46:5060;branch=z9hG4bK07e4e24b

Max-Forwards: 69

From: "+393484160884" <sip:+393484160884@sip.messagenet.it>;tag=as71dbda44

To: <sip:0292969196@212.97.59.76>

Contact: <sip:+393484160884@193.227.104.46:5060>

Call-ID: 54f9b13d2cb5eba93828833016685e66@sip.messagenet.it

CSeq: 102 INVITE

User-Agent: oscar

Date: Tue, 19 Jan 2016 15:34:56 GMT

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH

Supported: replaces, timer

Content-Type: application/sdp

Content-Length: 369

v=0

o=root 1309115217 1309115217 IN IP4 193.227.104.39

s=Messagenet

c=IN IP4 193.227.104.39

t=0 0

m=audio 36582 RTP/AVP 18 3 97 8 0 101

a=rtpmap:18 G729/8000

a=fmtp:18 annexb=no

a=rtpmap:3 GSM/8000

a=rtpmap:97 iLBC/8000

a=fmtp:97 mode=30

a=rtpmap:8 PCMA/8000

a=rtpmap:0 PCMU/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=ptime:20

a=sendrecv


Jan 19 15:34:56.481: //714648/06E0E1519597/SIP/Msg/ccsipDisplayMsg:
Sent:
SIP/2.0 100 Trying

Via: SIP/2.0/UDP 212.97.59.76;branch=z9hG4bKcabe.857f13e7.0,SIP/2.0/UDP 193.227.104.46:5060;branch=z9hG4bK07e4e24b

From: "+393484160884" <sip:+393484160884@sip.messagenet.it>;tag=as71dbda44

To: <sip:0292969196@212.97.59.76>

Date: Tue, 19 Jan 2016 15:34:56 GMT

Call-ID: 54f9b13d2cb5eba93828833016685e66@sip.messagenet.it

CSeq: 102 INVITE

Allow-Events: telephone-event

Server: Cisco-SIPGateway/IOS-15.4.2.T

Content-Length: 0


Jan 19 15:34:56.549: //714648/06E0E1519597/SIP/Msg/ccsipDisplayMsg:
Sent:
SIP/2.0 200 OK

Via: SIP/2.0/UDP 212.97.59.76;branch=z9hG4bKcabe.857f13e7.0,SIP/2.0/UDP 193.227.104.46:5060;branch=z9hG4bK07e4e24b

From: "+393484160884" <sip:+393484160884@sip.messagenet.it>;tag=as71dbda44

To: <sip:0292969196@212.97.59.76>;tag=9CE8E738-2494

Date: Tue, 19 Jan 2016 15:34:56 GMT

Call-ID: 54f9b13d2cb5eba93828833016685e66@sip.messagenet.it

CSeq: 102 INVITE

Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER

Allow-Events: telephone-event

Contact: <sip:5406031279@100.68.23.82:5060>

Record-Route: <sip:212.97.59.76;lr=on;ftag=as71dbda44;rpp=np>

Supported: replaces

Supported: sdp-anat

Server: Cisco-SIPGateway/IOS-15.4.2.T

Supported: timer

Content-Type: application/sdp

Content-Disposition: session;handling=required

Content-Length: 247

v=0

o=CiscoSystemsSIP-GW-UserAgent 4267 6147 IN IP4 100.68.23.82

s=SIP Call

c=IN IP4 100.68.23.82

t=0 0

m=audio 23386 RTP/AVP 0 101

c=IN IP4 100.68.23.82

a=rtpmap:0 PCMU/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=ptime:20


Jan 19 15:34:56.557: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:
ACK sip:5406031279@100.68.23.82:5060 SIP/2.0

Record-Route: <sip:212.97.59.76;lr=on;ftag=as71dbda44;rpp=np>

Via: SIP/2.0/UDP 212.97.59.76;branch=z9hG4bKcydzigwkX

Via: SIP/2.0/UDP 193.227.104.46:5060;branch=z9hG4bK054b9b61

Max-Forwards: 69

From: "+393484160884" <sip:+393484160884@sip.messagenet.it>;tag=as71dbda44

To: <sip:0292969196@212.97.59.76>;tag=9CE8E738-2494

Contact: <sip:+393484160884@193.227.104.46:5060>

Call-ID: 54f9b13d2cb5eba93828833016685e66@sip.messagenet.it

CSeq: 102 ACK

User-Agent: oscar

Content-Length: 0


Jan 19 15:35:02.229: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:
REGISTER sip:192.168.100.1 SIP/2.0

Via: SIP/2.0/UDP 10.10.10.137:5060;branch=z9hG4bKa15f3c6aa8a38ecbf6444aaa502446aa;rport

From: "0292969156" <sip:0292969156@192.168.100.1>;tag=2904050772

To: "0292969156" <sip:0292969156@192.168.100.1>

Call-ID: 389922895@10_10_10_137

CSeq: 4501 REGISTER

Contact: <sip:0292969156@10.10.10.137:5060>

Max-Forwards: 70

User-Agent: A510 IP/42.076.00.000.000

Expires: 180

Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, REFER, SUBSCRIBE, NOTIFY

Content-Length: 0


Jan 19 15:35:02.233: //714660/0A51A07095B3/SIP/Msg/ccsipDisplayMsg:
Sent:
SIP/2.0 200 OK

Via: SIP/2.0/UDP 10.10.10.137:5060;branch=z9hG4bKa15f3c6aa8a38ecbf6444aaa502446aa;rport

From: "0292969156" <sip:0292969156@192.168.100.1>;tag=2904050772

To: "0292969156" <sip:0292969156@192.168.100.1>;tag=9CE8FD6C-664

Date: Tue, 19 Jan 2016 15:35:02 GMT

Call-ID: 389922895@10_10_10_137

Server: Cisco-SIPGateway/IOS-15.4.2.T

CSeq: 4501 REGISTER

Contact: <sip:0292969156@10.10.10.137:5060>;expires=180

Expires:  180

Content-Length: 0


Jan 19 15:35:08.641: //714648/06E0E1519597/SIP/Msg/ccsipDisplayMsg:
Sent:
BYE sip:+393484160884@193.227.104.46:5060 SIP/2.0

Via: SIP/2.0/UDP 100.68.23.82:5060;branch=z9hG4bK1326415C4

From: <sip:0292969196@212.97.59.76>;tag=9CE8E738-2494

To: "+393484160884" <sip:+393484160884@sip.messagenet.it>;tag=as71dbda44

Date: Tue, 19 Jan 2016 15:34:56 GMT

Call-ID: 54f9b13d2cb5eba93828833016685e66@sip.messagenet.it

User-Agent: Cisco-SIPGateway/IOS-15.4.2.T

Max-Forwards: 70

Route: <sip:212.97.59.76;lr=on;ftag=as71dbda44;rpp=np>

Timestamp: 1453217708

CSeq: 101 BYE

Reason: Q.850;cause=16

P-RTP-Stat: PS=597,OS=95520,PR=604,OR=96640,PL=0,JI=0,LA=0,DU=12

Content-Length: 0


Jan 19 15:35:08.653: //714648/06E0E1519597/SIP/Msg/ccsipDisplayMsg:
Received:
SIP/2.0 200 OK

Via: SIP/2.0/UDP 100.68.23.82:5060;rport=5060;received=151.0.246.147;branch=z9hG4bK1326415C4

Record-Route: <sip:212.97.59.76;lr=on;ftag=9CE8E738-2494;rpp=pn>

From: <sip:0292969196@212.97.59.76>;tag=9CE8E738-2494

To: "+393484160884" <sip:+393484160884@sip.messagenet.it>;tag=as71dbda44

Call-ID: 54f9b13d2cb5eba93828833016685e66@sip.messagenet.it

CSeq: 101 BYE

Server: oscar

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH

Supported: replaces, timer

Content-Length: 0


Jan 19 15:35:10.177: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:
...

Hi,

I have never had to do this and I would first ask the SIP provider whether they can modify the INVITE messages so that they use the number that you want.

If they cannot do this then you might be able to use SIP Normalization with SIP profiles to modify the messages.

http://www.cisco.com/c/en/us/support/docs/voice-unified-communications/unified-border-element/105624-cube-sip-normalization.html#notes

I have never used them to do something as complex as this though so I am not sure whether it would work.