cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1322
Views
15
Helpful
8
Replies

Voice transaltion rule not working with With SIP DID#'s

jchangela
Level 1
Level 1

We have problem when a outside caller dials a DID # rule  4419xxxx756 the voice translation rule is not routing the calls to the users designated extension # it keeps landing to the catch all rule 21 /^.*/ /2100/  I have

 

The PBX is in UK and  the SIP trunk carrier is a UK carrier.

 

Please see the config and the debug log

 


3900_PBX>en
3900_PBX#show run
Building configuration...


Current configuration : 16161 bytes
!
! Last configuration change at 03:41:43 DST Wed Apr 28 2021
!
version 15.6
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname 3900_PBX
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
clock timezone ENG 1 0
clock summer-time DST recurring
!
!
!
!
!
!
!
!
!
!
!
no ip dhcp use vrf connected
ip dhcp excluded-address 192.168.20.1 192.168.20.19
ip dhcp excluded-address 192.168.20.1 192.168.20.20
ip dhcp excluded-address 172.29.100.1 172.29.100.20
!
!
!
ip name-server 8.8.8.8
ip name-server 8.8.4.4
ip cef
no ipv6 cef
!
!
flow record nbar-appmon
match ipv4 source address
match ipv4 destination address
match application name
collect interface output
collect counter bytes
collect counter packets
collect timestamp absolute first
collect timestamp absolute last
!
!
flow monitor application-mon
cache timeout active 60
record nbar-appmon
!
!
multilink bundle-name authenticated
!
!
!
!
!
!
trunk group main
!
cts logging verbose
voice-card 0
!
!
!
voice service voip
ip address trusted list
ipv4 172.29.100.0 255.255.255.0
ipv4 62.133.0.196
ipv4 172.29.120.0 255.255.255.0
ipv4 172.29.110.0 255.255.255.0
ipv4 172.29.130.0 255.255.255.0
ipv4 0.0.0.0 0.0.0.0
allow-connections h323 to h323
allow-connections h323 to sip
allow-connections sip to h323
allow-connections sip to sip
supplementary-service h450.12
no supplementary-service sip moved-temporarily
no supplementary-service sip refer
fax protocol pass-through g711ulaw
sip
registrar server expires max 1200 min 300
!
voice class codec 1
codec preference 1 g711ulaw
!
!
voice class sip-profiles 1
request INVITE sip-header From modify "<sip:(*.*)@62.133.xxx.xxx>" "<sip:441903707756@spitfiretsp.net:5060>"
request REINVITE sip-header From modify "<sip:(*.*)@62.133.xxx.xxx>" "<sip:441903707756@spitfiretsp.net:5060>"
!
!
!
voice register global
mode cme
source-address 172.29.100.2 port 5060
max-dn 256
max-pool 128
load 8841 sip88xx.12-7-1-0001-393
timezone 22
voicemail 2000
tftp-path flash:
file text
create profile sync 0013503413619041
ntp-server 172.29.100.2 mode unicast
auto-register
!
!
voice register dn 1
number 7756
call-forward b2bua busy 2000
call-forward b2bua noan 2000 timeout 20
allow watch
name Mxxx Lxxxxx
label Mxxx Lxxxxx
mwi
!
voice register dn 2
number 8180
call-forward b2bua busy 2000
call-forward b2bua noan 2000 timeout 20
allow watch
name Axx Fxxxxxx
label Axx Fxxxxxx
mwi
!
voice register dn 3
number 7798
call-forward b2bua busy 2000
call-forward b2bua noan 2000 timeout 20
allow watch
name Txxxx Dxxxxx
label Txxxxx Dxxxxx
mwi
!
voice register dn 4
number 7760
call-forward b2bua busy 2000
call-forward b2bua noan 2000 timeout 20
allow watch
name DARRYL HARRISON
label DARRYL HARRISON
mwi
!
voice register dn 5
number 7758
call-forward b2bua busy 2000
call-forward b2bua noan 2000 timeout 20
allow watch
name Txxx Sxxxx
label Txxx Sxxxx
mwi
!
voice register dn 6
number 7739
call-forward b2bua busy 2000
call-forward b2bua noan 2000 timeout 20
allow watch
name Dxxxx Mxxxxx
label Dxxxxx Mxxxxx
mwi
!

!
!
!
voice translation-rule 1
rule 1 /441xxxxx7753/ /7153/
rule 2 /441xxxxx1904/ /1904/
rule 3 /441xxxxx1905/ /1905/
rule 4 /441xxxxx7740/ /7151/
rule 5 /441xxxxx7741/ /7741/
rule 6 /441xxxxx7742/ /7742/
rule 7 /441xxxxx7743/ /7743/
rule 8 /441xxxxx7744/ /7744/
rule 9 /441xxxxx7745/ /7745/
rule 10 /441xxxxx7746/ /7746/
rule 11 /441xxxxx7747/ /7747/
rule 12 /441xxxxx7748/ /7748/
rule 13 /441xxxxx7749/ /7749/
rule 14 /441xxxxx7750/ /7750/
rule 15 /441xxxxx7751/ /7751/
rule 16 /441xxxxx7752/ /7152/
rule 17 /441xxxxx7754/ /7754/
rule 18 /441xxxxx7755/ /7755/
rule 19 /441xxxxx7756/ /7756/
rule 20 /019xxxxx7757/ /7757/
rule 21 /^.*/ /2100/
!
voice translation-rule 2
rule 1 /^.*/ /1xxxxx8850/
!
!
voice translation-profile Inbound
translate called 1
!
voice translation-profile Outbound
translate calling 2
!
!
!
vxml logging-tag
license udi pid C3900-SPE150/K9 sn FOC15426V1H
license accept end user agreement
!
!
username root privilege 15 secret 5 $1$Mxsb$pTP72SlGeR/iG/CBZx5FM0
!
redundancy
!
!
!
!
!

!
!
interface Embedded-Service-Engine0/0
no ip address
shutdown
!
interface GigabitEthernet0/0
ip address 172.29.100.2 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
!
interface GigabitEthernet0/2
ip address dhcp
duplex auto
speed auto
!
ip forward-protocol nd
!
ip http server
ip http authentication local
no ip http secure-server
ip http path flash0:/CME-GUI-11.7
!
ip route 0.0.0.0 0.0.0.0 172.29.100.1
!

!
control-plane
!

mgcp profile default
!
!
!
!
dial-peer voice 200 voip
destination-pattern 2[012]00
b2bua
session protocol sipv2
session target ipv4:172.29.100.5
dtmf-relay sip-notify
codec g711ulaw
no vad
!
dial-peer voice 131 voip
description ** outbound **
translation-profile outgoing Outbound
destination-pattern [2-9]11
session protocol sipv2
session target sip-server
voice-class codec 1
dtmf-relay rtp-nte
no vad
!
dial-peer voice 111 voip
description ** outbound **
translation-profile outgoing Outbound
destination-pattern 0..........
session protocol sipv2
session target dns:mproxy6.spitfiretsp.net:5060
voice-class codec 1
voice-class sip profiles 1
dtmf-relay rtp-nte
no vad
!
dial-peer voice 121 voip
description ** inbound **
translation-profile incoming Inbound
session protocol sipv2
session target sip-server
incoming called-number ............
voice-class codec 1
dtmf-relay rtp-nte
no vad
!
!
presence
presence call-list
!
sip-ua
credentials username 441xxxxx8850 password 7 106D003D1C030603190527 realm spitfiretsp.net
keepalive target ipv4:62.133.0.196:5060
authentication username 441xxxxx8850 password 7 106D003D1C030603190527
retry invite 2
registrar ipv4:62.133.xxx.xxx:5060 expires 600
sip-server ipv4:62.133.xxx.xxx:5060
connection-reuse
host-registrar
!
!
!
gatekeeper
shutdown
!
!
telephony-service
max-ephones 32
max-dn 32
ip source-address 172.29.100.2 port 2000
calling-number initiator
system message Call 2 Customize 253.458.4391
cnf-file location flash:
load 7921 CP7921G-1.4.5SR1.3.LOADS
load 7945 SCCP45.9-3-1SR4-1S.loads
load 7965 SCCP45.9-3-1SR4-1S.loads
load 8945 SCCP894x.9-2-2-0.loads
time-zone 21
bulk-speed-dial list 1 flash0:BULKDIAL.TXT
voicemail 2000
mwi relay
max-conferences 8 gain -6
call-forward pattern .T
moh enable-g711 "music-on-hold.au"
multicast moh 239.2.2.2 port 2000
web admin system name root password web4cme!
dn-webedit
time-webedit
transfer-system full-consult
transfer-pattern .T
fac custom callfwd all *72
fac custom callfwd cancel *73
create cnf-files version-stamp 7960 Feb 08 2021 06:10:19
!

!
!
!
!
!
line con 0
line aux 0
line 2
no activation-character
no exec
transport preferred none
transport output pad telnet rlogin lapb-ta mop udptn v120 ssh
stopbits 1
line vty 0 4
login local
transport input telnet
!
scheduler allocate 20000 1000
ntp peer 172.29.100.2
ntp server 66.228.59.187
!
end

3900_PBX#$

 

___________________________Debug Log______________________________

 

Received:
INVITE sip:441xxxxx8850@172.29.100.2:5060 SIP/2.0
Via: SIP/2.0/UDP 62.133.0.196:5060;branch=z9hG4bKmhsveq0098da4ejacic0.1
Max-Forwards: 15
From: <sip:0014133248881@87.224.0.9>;tag=FHU0FSBeDF38g
To: <sip:441xxxxx7756@62.133.0.199>
Call-ID: 9780ee49-2256-123a-64b3-5065f3f05b98
CSeq: 35230009 INVITE
Contact: <sip:001xxxxx8881@62.133.0.196:5060;transport=udp>
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 273
Remote-Party-ID: <sip:001xxxxx8881@87.224.0.9>;party=calling;screen=yes;privacy=off

v=0
o=FreeSWITCH 1619541684 1619541685 IN IP4 62.133.0.196
s=FreeSWITCH
c=IN IP4 62.133.0.196
t=0 0
m=audio 59536 RTP/AVP 8 0 18 101 13
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20

Apr 27 23:53:22.734: //59/9598C5F98039/SIP/Msg/ccsipDisplayMsg:
Sent:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 62.133.0.196:5060;branch=z9hG4bKmhsveq0098da4ejacic0.1
From: <sip:001xxxxx8881@87.224.0.9>;tag=FHU0FSBeDF38g
To: <sip:441903707756@62.133.0.199>
Date: Tue, 27 Apr 2021 23:53:22 GMT
Call-ID: 9780ee49-2256-123a-64b3-5065f3f05b98
CSeq: 35230009 INVITE
Allow-Events: telephone-event
Server: Cisco-SIPGateway/IOS-15.6.3.M6a
Session-ID: 00000000000000000000000000000000;remote=0b19d27746bc547aa7e3152df1f21284
Content-Length: 0

Apr 27 23:53:22.734: //60/9598C5F98039/SIP/Msg/ccsipDisplayMsg:
Sent:
INVITE sip:2100@172.29.110.23:5060 SIP/2.0
Via: SIP/2.0/UDP 172.29.100.2:5060;branch=z9hG4bK511C82
Remote-Party-ID: <sip:001xxxxx8881@172.29.100.2>;party=calling;screen=yes;privacy=off
From: <sip:001xxxxx8881@62.133.0.196>;tag=C4998-16F7
To: <sip:2100@172.29.110.23>
Date: Tue, 27 Apr 2021 23:53:22 GMT
Call-ID: 95996221-A6EA11EB-803FB806-8DD8EA40@172.29.100.2
Supported: 100rel,timer,resource-priority,replaces
Min-SE: 1800
Cisco-Guid: 2509817337-2800357867-2151266310-2379803200
User-Agent: Cisco-SIPGateway/IOS-15.6.3.M6a
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 101 INVITE
Timestamp: 1619567602
Contact: <sip:001xxxxx8881@172.29.100.2:5060>
Expires: 180
Allow-Events: telephone-event
Max-Forwards: 14
Session-ID: 0b19d27746bc547aa7e3152df1f21284;remote=00000000000000000000000000000000
Content-Type: application/sdp
Content-Disposition: session;handling=required
Content-Length: 244

v=0
o=CiscoSystemsSIP-GW-UserAgent 749 23 IN IP4 172.29.100.2
s=SIP Call
c=IN IP4 172.29.100.2
t=0 0
m=audio 16406 RTP/AVP 0 101
c=IN IP4 172.29.100.2
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20

Apr 27 23:53:22.746: //60/9598C5F98039/SIP/Msg/ccsipDisplayMsg:
Received:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 172.29.100.2:5060;branch=z9hG4bK511C82
From: <sip:001xxxxx8881@62.133.0.196>;tag=C4998-16F7
To: <sip:2100@172.29.110.23>
Call-ID: 95996221-A6EA11EB-803FB806-8DD8EA40@172.29.100.2
Date: Tue, 27 Apr 2021 23:53:22 GMT
CSeq: 101 INVITE
Server: Cisco-CP7841/10.3.1
Contact: <sip:5870-2431@172.29.110.23:5060;transport=udp>
Allow: ACK,BYE,CANCEL,INVITE,NOTIFY,OPTIONS,REFER,REGISTER,UPDATE,SUBSCRIBE,INFO
Supported: replaces,join,sdp-anat,norefersub,resource-priority,extended-refer,X-cisco-callinfo,X-cisco-serviceuri,X-cisco-escapecodes,X-cisco-service-control,X-cisco-srtp-fallback,X-cisco-monrec,X-cisco-config,X-cisco-sis-7.0.0,X-cisco-xsi-8.5.1
Allow-Events: kpml,dialog
Content-Length: 0


Apr 27 23:53:22.834: //60/9598C5F98039/SIP/Msg/ccsipDisplayMsg:
Received:
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 172.29.100.2:5060;branch=z9hG4bK511C82
From: <sip:001xxxxx8881@62.133.0.196>;tag=C4998-16F7
To: <sip:2100@172.29.110.23>;tag=f0b2e5787b55028856812328-39743975
Call-ID: 95996221-A6EA11EB-803FB806-8DD8EA40@172.29.100.2
Date: Tue, 27 Apr 2021 23:53:22 GMT
CSeq: 101 INVITE
Server: Cisco-CP7841/10.3.1
Contact: <sip:5870-2431@172.29.110.23:5060;transport=udp>
Allow: ACK,BYE,CANCEL,INVITE,NOTIFY,OPTIONS,REFER,REGISTER,UPDATE,SUBSCRIBE,INFO
Remote-Party-ID: "TYRONE DOWD" <sip:2100@172.29.100.2>;party=called;id-type=subscriber;privacy=off;screen=yes
Supported: replaces,join,sdp-anat,norefersub,resource-priority,extended-refer,X-cisco-callinfo,X-cisco-serviceuri,X-cisco-escapecodes,X-cisco-service-control,X-cisco-srtp-fallback,X-cisco-monrec,X-cisco-config,X-cisco-sis-7.0.0,X-cisco-xsi-8.5.1
Allow-Events: kpml,dialog
Content-Length: 0


Apr 27 23:53:22.834: //59/9598C5F98039/SIP/Msg/ccsipDisplayMsg:
Sent:
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 62.133.0.196:5060;branch=z9hG4bKmhsveq0098da4ejacic0.1
From: <sip:001xxxxx8881@87.224.0.9>;tag=FHU0FSBeDF38g
To: <sip:441xxxxx7756@62.133.0.199>;tag=C49FC-3C7
Date: Tue, 27 Apr 2021 23:53:22 GMT
Call-ID: 9780ee49-2256-123a-64b3-5065f3f05b98
CSeq: 35230009 INVITE
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
Allow-Events: telephone-event
Remote-Party-ID: "TYRONE DOWD" <sip:2100@172.29.100.2>;party=called;screen=yes;privacy=off
Contact: <sip:441903708850@172.29.100.2:5060>
Server: Cisco-SIPGateway/IOS-15.6.3.M6a
Session-ID: 15d76d5abcbd5ae492507970acc5ea6f;remote=0b19d27746bc547aa7e3152df1f21284
Content-Length: 0


Apr 27 23:53:39.887: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:
CANCEL sip:441xxxxx8850@172.29.100.2:5060 SIP/2.0
Via: SIP/2.0/UDP 62.133.0.196:5060;branch=z9hG4bKmhsveq0098da4ejacic0.1
CSeq: 35230009 CANCEL
Max-Forwards: 15
From: <sip:00xxxxx8881@87.224.0.9>;tag=FHU0FSBeDF38g
To: <sip:441903707756@62.133.0.199>
Call-ID: 9780ee49-2256-123a-64b3-5065f3f05b98
Content-Length: 0
Reason: Q.850;cause=16;text="NORMAL_CLEARING"


Apr 27 23:53:39.887: //59/9598C5F98039/SIP/Msg/ccsipDisplayMsg:
Sent:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 62.133.0.196:5060;branch=z9hG4bKmhsveq0098da4ejacic0.1
From: <sip:001xxxxx8881@87.224.0.9>;tag=FHU0FSBeDF38g
To: <sip:441xxxxx7756@62.133.0.199>
Date: Tue, 27 Apr 2021 23:53:39 GMT
Call-ID: 9780ee49-2256-123a-64b3-5065f3f05b98
CSeq: 35230009 CANCEL
Session-ID: 15d76d5abcbd5ae492507970acc5ea6f;remote=0b19d27746bc547aa7e3152df1f21284
Content-Length: 0

2 Accepted Solutions

Accepted Solutions

Have a look at this post. https://community.cisco.com/t5/ip-telephony-and-phones/sip-profile-for-incoming-dial-peer/td-p/3338805

You need to copy the content of the To field into the Request-URI as that is what is used for the call routing. I did a quick test with the SIP profile test tool and from that the post should have what you need.

image.png

It sort of hard to see on the screenshot, but the rule is like below.

voice class sip-profiles 1
 request INVITE sip-header To copy "sip:(.*)@" u01
 request INVITE sip-header SIP-Req-URI modify ".*@(.*)" "INVITE sip:\u01@\1"

Have a look at this excellent document for more details around how to modify information in the SIP headers. In Depth Explanation of Cisco IOS and IOS-XE Call Routing - Cisco 

If you'd want to test this for yourself this is the link to the SIP profile test tool. SIP-Profile Test Tool 



Response Signature


View solution in original post

Hi Roger,

 

We were able to resolve the issue based on your response to this thread, pus from another thread you had responded to.

 

See below what we did to fix our DID not routing to user extension.

 

no voice class sip-profiles 1

voice class sip-profiles 1
request INVITE sip-header From modify "<sip:(.*)@62.133.xxx.xxx>" "<sip:441xxxxx8850@spitfiretsp.net>"
request INVITE sip-header To copy "sip:(.*)@" u01
request INVITE sip-header SIP-Req-URI modify ".*@(.*)" "INVITE sip:\u01@\1"
exit
voice service voip
sip
sip-profiles inbound
exit
dial-peer voice 121 voip
voice-class sip profiles 1 inbound
exit
no voice translation-rule 1
voice translation-rule 1
rule 1 /^441xxxxx7753/ /7153/
rule 2 /^441xxxxx1904/ /1904/
rule 3 /^441xxxxx1905/ /1905/
rule 4 /^441xxxxx7740/ /7151/
rule 5 /^441xxxxx7741/ /7741/
rule 6 /^441xxxxx7742/ /7742/
rule 7 /^441xxxxx7743/ /7743/
rule 8 /^441xxxxx7744/ /7744/
rule 9 /^441xxxxx7745/ /7745/
rule 10 /^441xxxxx7746/ /7746/
rule 11 /^441xxxxx7747/ /7747/
rule 12 /^441xxxxx7748/ /7748/
rule 13 /^441xxxxx7749/ /7749/
rule 14 /^441xxxxx7750/ /7750/
rule 15 /^441xxxxx7751/ /7751/
rule 16 /^441xxxxx7752/ /7152/
rule 17 /^441xxxxx7754/ /7754/
rule 18 /^441xxxxx7755/ /7755/
rule 19 /^441xxxxx7756/ /7756/
rule 20 /^441xxxxx7757/ /7757/
rule 21 /^441xxxxx7758/ /7758/
rule 22 /^441xxxxx7759/ /7759/
rule 23 /^441xxxxx7760/ /7760/
rule 24 /^441xxxxx7761/ /7761/
rule 25 /^441xxxxx7762/ /7762/
rule 26 /^441xxxxx7763/ /7763/
rule 27 /^441xxxxx7764/ /7764/
rule 28 /^441xxxxx7765/ /7154/
rule 29 /^441xxxxx7766/ /7766/
rule 30 /^441xxxxx7767/ /7767/
rule 31 /^441xxxxx7768/ /7768/
rule 32 /^441xxxxx7769/ /7769/
rule 33 /^441xxxxx7770/ /7770/
rule 34 /^441xxxxx7771/ /7771/
rule 35 /^441xxxxx7772/ /7772/
rule 36 /^441xxxxx7773/ /7773/
rule 37 /^441xxxxx7774/ /7774/
rule 38 /^441xxxxx7775/ /7775/
rule 39 /^441xxxxx7776/ /7776/
rule 40 /^441xxxxx7777/ /7777/
rule 41 /^441xxxxx7778/ /7778/
rule 42 /^441xxxxx7779/ /7779/
rule 43 /^441xxxxx7780/ /7780/
rule 44 /^441xxxxx7781/ /7781/
rule 45 /^441xxxxx7782/ /7782/
rule 46 /^441xxxxx7783/ /7783/
rule 47 /^441xxxxx7784/ /7784/
rule 48 /^441xxxxx7785/ /7785/
rule 49 /^441xxxxx7786/ /7786/
rule 50 /^441xxxxx7787/ /7787/
rule 51 /^441xxxxx7788/ /7155/
rule 52 /^441xxxxx7789/ /7156/
rule 53 /^441xxxxx7790/ /7790/
rule 54 /^441xxxxx7791/ /7791/
rule 55 /^441xxxxx7792/ /7792/
rule 56 /^441xxxxx7793/ /7739/
rule 57 /^441xxxxx7794/ /7794/
rule 58 /^441xxxxx7795/ /7795/
rule 59 /^441xxxxx7796/ /7796/
rule 60 /^441xxxxx7797/ /7792/
rule 61 /^441xxxxx7798/ /7798/
rule 62 /^441xxxxx7799/ /7799/
rule 63 /^441xxxxx8180/ /8180/
rule 64 /^441xxxxx8182/ /7157/
rule 65 /^441xxxxx8183/ /8183/
rule 66 /^441xxxxx8184/ /8184/
rule 67 /^441xxxxx8185/ /8185/
rule 68 /^441xxxxx8186/ /8186/
rule 69 /^441xxxxx8187/ /8187/
rule 70 /^441xxxxx8188/ /7159/
rule 71 /^441xxxxx8850/ /7150/
rule 72 /^441xxxxx8852/ /8852/
rule 73 /^441xxxxx8853/ /8853/
rule 74 /^441xxxxx8854/ /8854/
rule 75 /^441xxxxx8855/ /8855/
rule 76 /^441xxxxx8856/ /8856/
rule 77 /^441xxxxx8857/ /8857/
rule 78 /^441xxxxx8858/ /8858/
rule 79 /^441xxxxx7223/ /7787/
rule 80 /^.*/ /2100/

 

View solution in original post

8 Replies 8

VON CLAWSON
Level 3
Level 3

It would appear that the ^.* may be causing your issue. I would suggest removing the ^ which means starting with. If that doesn't work try adding the ^ to the rules starting with 44. for example rule 19 /^441903707756/ /7756/. You could also add a $ as the end of the pattern would would mean an exact match.

Let me know if that helps.

Please rate if this helps.

The routing is made on the request URI and that contains this in your debug.

Received:
INVITE sip:441903708850@172.29.100.2:5060 SIP/2.0

AFAIKT you do not have any specific rule that match this. Apart from this you should consider simplifying your rules as it’s not very practical to have individual rules per number. From what I can tell you mostly want to keep the last 4 digits of the received number. This should be possible to achieve with far less number of rules.



Response Signature


jchangela
Level 1
Level 1

BTY, I wan to clarify all the rules 1 - 20 do NOT work, they all land in our catch all rule 21 /^.*/ /2100/

Have a look at this post. https://community.cisco.com/t5/ip-telephony-and-phones/sip-profile-for-incoming-dial-peer/td-p/3338805

You need to copy the content of the To field into the Request-URI as that is what is used for the call routing. I did a quick test with the SIP profile test tool and from that the post should have what you need.

image.png

It sort of hard to see on the screenshot, but the rule is like below.

voice class sip-profiles 1
 request INVITE sip-header To copy "sip:(.*)@" u01
 request INVITE sip-header SIP-Req-URI modify ".*@(.*)" "INVITE sip:\u01@\1"

Have a look at this excellent document for more details around how to modify information in the SIP headers. In Depth Explanation of Cisco IOS and IOS-XE Call Routing - Cisco 

If you'd want to test this for yourself this is the link to the SIP profile test tool. SIP-Profile Test Tool 



Response Signature


Hi Roger,

 

We were able to resolve the issue based on your response to this thread, pus from another thread you had responded to.

 

See below what we did to fix our DID not routing to user extension.

 

no voice class sip-profiles 1

voice class sip-profiles 1
request INVITE sip-header From modify "<sip:(.*)@62.133.xxx.xxx>" "<sip:441xxxxx8850@spitfiretsp.net>"
request INVITE sip-header To copy "sip:(.*)@" u01
request INVITE sip-header SIP-Req-URI modify ".*@(.*)" "INVITE sip:\u01@\1"
exit
voice service voip
sip
sip-profiles inbound
exit
dial-peer voice 121 voip
voice-class sip profiles 1 inbound
exit
no voice translation-rule 1
voice translation-rule 1
rule 1 /^441xxxxx7753/ /7153/
rule 2 /^441xxxxx1904/ /1904/
rule 3 /^441xxxxx1905/ /1905/
rule 4 /^441xxxxx7740/ /7151/
rule 5 /^441xxxxx7741/ /7741/
rule 6 /^441xxxxx7742/ /7742/
rule 7 /^441xxxxx7743/ /7743/
rule 8 /^441xxxxx7744/ /7744/
rule 9 /^441xxxxx7745/ /7745/
rule 10 /^441xxxxx7746/ /7746/
rule 11 /^441xxxxx7747/ /7747/
rule 12 /^441xxxxx7748/ /7748/
rule 13 /^441xxxxx7749/ /7749/
rule 14 /^441xxxxx7750/ /7750/
rule 15 /^441xxxxx7751/ /7751/
rule 16 /^441xxxxx7752/ /7152/
rule 17 /^441xxxxx7754/ /7754/
rule 18 /^441xxxxx7755/ /7755/
rule 19 /^441xxxxx7756/ /7756/
rule 20 /^441xxxxx7757/ /7757/
rule 21 /^441xxxxx7758/ /7758/
rule 22 /^441xxxxx7759/ /7759/
rule 23 /^441xxxxx7760/ /7760/
rule 24 /^441xxxxx7761/ /7761/
rule 25 /^441xxxxx7762/ /7762/
rule 26 /^441xxxxx7763/ /7763/
rule 27 /^441xxxxx7764/ /7764/
rule 28 /^441xxxxx7765/ /7154/
rule 29 /^441xxxxx7766/ /7766/
rule 30 /^441xxxxx7767/ /7767/
rule 31 /^441xxxxx7768/ /7768/
rule 32 /^441xxxxx7769/ /7769/
rule 33 /^441xxxxx7770/ /7770/
rule 34 /^441xxxxx7771/ /7771/
rule 35 /^441xxxxx7772/ /7772/
rule 36 /^441xxxxx7773/ /7773/
rule 37 /^441xxxxx7774/ /7774/
rule 38 /^441xxxxx7775/ /7775/
rule 39 /^441xxxxx7776/ /7776/
rule 40 /^441xxxxx7777/ /7777/
rule 41 /^441xxxxx7778/ /7778/
rule 42 /^441xxxxx7779/ /7779/
rule 43 /^441xxxxx7780/ /7780/
rule 44 /^441xxxxx7781/ /7781/
rule 45 /^441xxxxx7782/ /7782/
rule 46 /^441xxxxx7783/ /7783/
rule 47 /^441xxxxx7784/ /7784/
rule 48 /^441xxxxx7785/ /7785/
rule 49 /^441xxxxx7786/ /7786/
rule 50 /^441xxxxx7787/ /7787/
rule 51 /^441xxxxx7788/ /7155/
rule 52 /^441xxxxx7789/ /7156/
rule 53 /^441xxxxx7790/ /7790/
rule 54 /^441xxxxx7791/ /7791/
rule 55 /^441xxxxx7792/ /7792/
rule 56 /^441xxxxx7793/ /7739/
rule 57 /^441xxxxx7794/ /7794/
rule 58 /^441xxxxx7795/ /7795/
rule 59 /^441xxxxx7796/ /7796/
rule 60 /^441xxxxx7797/ /7792/
rule 61 /^441xxxxx7798/ /7798/
rule 62 /^441xxxxx7799/ /7799/
rule 63 /^441xxxxx8180/ /8180/
rule 64 /^441xxxxx8182/ /7157/
rule 65 /^441xxxxx8183/ /8183/
rule 66 /^441xxxxx8184/ /8184/
rule 67 /^441xxxxx8185/ /8185/
rule 68 /^441xxxxx8186/ /8186/
rule 69 /^441xxxxx8187/ /8187/
rule 70 /^441xxxxx8188/ /7159/
rule 71 /^441xxxxx8850/ /7150/
rule 72 /^441xxxxx8852/ /8852/
rule 73 /^441xxxxx8853/ /8853/
rule 74 /^441xxxxx8854/ /8854/
rule 75 /^441xxxxx8855/ /8855/
rule 76 /^441xxxxx8856/ /8856/
rule 77 /^441xxxxx8857/ /8857/
rule 78 /^441xxxxx8858/ /8858/
rule 79 /^441xxxxx7223/ /7787/
rule 80 /^.*/ /2100/

 

Glad to hear that you managed to get it to work with the help of the information I provided.

One additional thing that you could do to simplify your voice translation rules to cut it down from 80 to 20 rows is this.

no voice translation-rule 1
voice translation-rule 1
 rule 1 /^441xxxxx7753$/ /7153/
 rule 2 /^441xxxxx7740$/ /7151/
 rule 3 /^441xxxxx7765$/ /7154/
 rule 4 /^441xxxxx7788$/ /7155/
 rule 5 /^441xxxxx7789$/ /7156/
 rule 6 /^441xxxxx7797$/ /7792/
 rule 7 /^441xxxxx8182$/ /7157/
 rule 8 /^441xxxxx8188$/ /7159/
 rule 9 /^441xxxxx8850$/ /7150/
 rule 10 /^441xxxxx7223$/ /7787/
 rule 11 /^441xxxxx\(190[45]\)$/ /\1/
 rule 12 /^441xxxxx\(774.\)$/ /\1/
 rule 13 /^441xxxxx\(775[0-24-9]\)$/ /\1/
 rule 14 /^441xxxxx\(776[0-46-9]\)$/ /\1/
 rule 15 /^441xxxxx\(777.\)$/ /\1/
 rule 16 /^441xxxxx\(778[0-7]\)$/ /\1/
 rule 17 /^441xxxxx\(779[0-689]\)$/ /\1/
 rule 18 /^441xxxxx\(818[03-7]\)$/ /\1/
 rule 19 /^441xxxxx\(885[2-8]\)$/ /\1/
 rule 20 /.*/ /2100/

One more thing, did you by intent mark your own post as the answer to your question? At the heart of the community is the means to give thanks to individuals that helps you out by giving helpful votes to posts and if applicable to mark posts given by others as the answer to the inquiry.



Response Signature


No I did not mean to mark my own post as the answer.