cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

AMA-CUCM Troubleshooting: Best Practices for Reading Trace Files

604
Views
15
Helpful
11
Replies
Contributor

SIP dialpeers, "show dialplan number" formatting.

I'm am stuck, trying to enforce dialpeer selection using a prefix.

Idea: use prefix "+9999" to select inbound dialpeer, use DialPeerGroup to select outgoing dialpeer.

Use translation-profile to discard prefix and dial remaining digits.

Using "csim start +9999+nnnnnnn" fails to find a dialpeer.

Trying to use "show dialplan" in different forms yields this:

inti-vgw1#show dialplan dialpeer 4620 number \+9999\+4525446346
Incorrect format for E.164 Number
        regular expression must be of the form  ^((\+)?([0-9,#*A-F])+)$

Any suggestions on formatting the dialednumber

Configuration elements:

voice class e164-pattern-map 4620
 description Call to SIP trunk inbound
  e164 +9999T
 !
voice class e164-pattern-map 4621
 description Call to SIP trunk outbound
  e164 +9999T
!
voice translation-rule 4621
 rule 3 /^\+9999/ //
!
voice translation-profile 4621
 translate called 4621
!
!        

dial-peer voice 4621 voip
 description *** CUBE to Novaram ***
 translation-profile outgoing 4621
 session protocol sipv2
 session target dns:siptrunk1.telavox.se
 session transport udp
 destination e164-pattern-map 4621
 voice-class codec 1 
 voice-class sip options-ping 60
 voice-class sip early-offer forced
 voice-class sip profiles 4621
 voice-class sip profiles 4623 inbound
 voice-class sip options-keepalive retry 3
 voice-class sip bind control source-interface GigabitEthernet0/1
 voice-class sip bind media source-interface GigabitEthernet0/1
 dtmf-relay rtp-nte
 no vad
!

dial-peer voice 4620 voip
 description *** CUCM to CUBE ***
  session protocol sipv2
 destination dpg 4600
 incoming called e164-pattern-map 4620
 voice-class codec 1 
 voice-class sip profiles 4620
 voice-class sip bind control source-interface GigabitEthernet0/0
 voice-class sip bind media source-interface GigabitEthernet0/0
 dtmf-relay rtp-nte
 no vad

 

fortvald
2 ACCEPTED SOLUTIONS

Accepted Solutions
Participant

Re: SIP dialpeers, "show dialplan number" formatting.

Try this...

 

uk-lon-dc-voice-r1#sho dialplan number +9999*4525446346
Macro Exp.: +9999*4525446346
No match, result=1(MORE_DIGITS_NEEDED)

Please remember to rate useful posts, click on the stars below.
VIP Advisor

Re: SIP dialpeers, "show dialplan number" formatting.

Destination patterns are left justified. So, +9999 and +9999T are the same. The only reason you need the T is if you are receiving the digits one by one. If you are just using SIP dial-peers, and no phones or certain PRIs which require this feature, then you can get rid of the T.

You stated in your opening "use DialPeerGroup to select outgoing dialpeer", but I don't see the use of DPG in your sample config. You posted DP 4620, with a reference to DGP 4600, but I cannot see the DPG 4600 to tell what's in it. Also, if you do end up using DPG at the end of the day, the destination pattern (or in your case the e164 map) is required to make this DP an outgoing DP, but it's ignored, and not used. Therefore, trying to match it with show dialplan number is pointless.

I don't typically use DPG, but when I do, I just set the destination pattern to something which makes sense, so that the unaware Engineer doesn't look at it and go "Well, that will never match anything, so it must be wrong."

As far as your prefixing is concerned, I think a mistake you might be making is to use the + in the middle of the number. This should and in some cases can only be used at the beginning of the number. The regular expression the CLI is giving you is pretty much describing the format, and having a plus sign (escaped too mind you), anywhere but at the front of the number is not supported.

My recommendation would be to go back to CUCM and pick a digit manip which removes the plus, and prefixes the number in place of the plus, then CUBE can remove the prefix and replace the plus.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
11 REPLIES 11

Re: SIP dialpeers, "show dialplan number" formatting.

Is there a reason you’re not matching the incoming dial-peer based on SIP URI? It’s *far* cleaner and less susceptible to breakage.

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/voice/cube/configuration/cube-book/voi-inbnd-dp-match-uri.html

Personally, I match off the host portion of the VIA header. Combine that with DPG and your CUBE won’t care about the calling/called number at all.
Highlighted
Contributor

Re: SIP dialpeers, "show dialplan number" formatting.

Unfortunately, thw CUBE needs to care about "called number", as the same source needs to route calls to different destinations (ISDN and SIP) based on who the call is to.

I have tried with alternative prefixes without success:

!
voice class e164-pattern-map 4621
description Call to SIP trunk outbound
e164 9998T
!
voice class e164-pattern-map 4620
description Call to SIP trunk inbound
e164 +9999T
e164 +9999+T
e164 9999T
!!
voice translation-rule 4620
rule 1 /^\+9999\(.*\)/ /9998\1/
rule 2 /^9999/ /9998/
rule 3 /^\+9999/ /9998/
!
voice translation-rule 4621
rule 1 /^9998\(.*\)/ /+\1/
rule 2 /^\+9998/ /+/
rule 3 /^9998/ /+/
!
dial-peer voice 4621 voip
description *** CUBE to Novaram ***
translation-profile outgoing 4621
session protocol sipv2
session target dns:siptrunk1.telavox.se
session transport udp
destination e164-pattern-map 4621
voice-class codec 1
voice-class sip options-ping 60
voice-class sip early-offer forced
voice-class sip profiles 4621
voice-class sip profiles 4623 inbound
voice-class sip options-keepalive retry 3
voice-class sip bind control source-interface GigabitEthernet0/1
voice-class sip bind media source-interface GigabitEthernet0/1
dtmf-relay rtp-nte
no vad
!
dial-peer voice 4620 voip
description *** CUCM to CUBE ***
translation-profile incoming 4620
session protocol sipv2
destination dpg 4600
incoming called e164-pattern-map 4620
voice-class codec 1
voice-class sip profiles 4620
voice-class sip bind control source-interface GigabitEthernet0/0
voice-class sip bind media source-interface GigabitEthernet0/0
dtmf-relay rtp-nte
no vad
! !

fortvald
VIP Mentor

Re: SIP dialpeers, "show dialplan number" formatting.

This picture is not clear. Why do you need the prefix. If you are routing based on called number, then all you need is dial-peers that match the called number. I am guessing there is more to it. So please elaborate on what you are trying to do.

Please rate all useful posts

Re: SIP dialpeers, "show dialplan number" formatting.

For that scenario I suggest using LPCOR to restrict the outbound dial-peer selection. In short:

  1. Incoming dial-peer matching uses SIP URI. This guarantees the correct incoming LPCOR list is applied regardless of calling/called number since it is applied using source IPv4 address/subnet mask.
  2. Use e164-pattern-map for outgoing dial-peer selection (e.g. CUCM vs. CVP).
  3. Restrict outbound dial-peers using LPCOR.

Here's a sanitized sample config:

 

! Tags are correlated:

! 1X PBX A

! 2X PBX B

! 3X PSTN

!

voice class uri 10 sip
host ipv4:10.10.10.10
!
voice class uri 20 sip
host ipv4:10.20.20.20
!
voice class uri 30 sip
host ipv4:198.51.100.1
!
voice class e164-pattern-map 10
e164 ! One or more number patterns here
!
voice class e164-pattern-map 20
e164 ! One or more number patterns here
!
voice class e164-pattern-map 30
e164 ! One or more number patterns here
!
voice lpcor enable
voice lpcor custom
group 10 PBX-A
group 20 PBX-B
group 30 PSTN
!
voice lpcor policy PBX-A
no accept PBX-A
accept PBX-B
accept PSTN
!
voice lpcor policy PBX-B
no accept PBX-B
accept PBX-A
accept PSTN
!
voice lpcor policy PSTN
no accept PSTN
accept PBX-A
accept PBX-B
!
 
voice lpcor ip-trunk subnet incoming
index 1 PBX-A 10.10.10.10 255.255.255.255
index 2 PBX-B 10.20.20.20 255.255.255.255
index 3 PSTN 198.51.100.1 255.255.255.255
!
dial-peer voice 10 voip
description Calls to/from PBX-A
lpcor outgoing PBX-A
session protocol sipv2
session target dns:hostname.domain.tld:5060
session transport tcp
destination e164-pattern-map 10
incoming uri via 10
voice-class sip profiles 10 ! Omitted from example
voice-class sip options-keepalive profile 1 ! Omitted from example
voice-class sip bind control source-interface Loopback0
voice-class sip bind media source-interface Loopback0
dtmf-relay rtp-nte sip-kpml
codec g711ulaw
ip qos dscp cs3 signaling
no vad
!
dial-peer voice 20 voip
description Calls to/from PBX-B
lpcor outgoing PBX-B
session protocol sipv2
session target dns:hostname.domain.tld:5060
session transport tcp
destination e164-pattern-map 20
incoming uri via 20
voice-class sip profiles 20 ! Omitted from example
voice-class sip options-keepalive profile 1 ! Omitted from example
voice-class sip bind control source-interface Loopback0
voice-class sip bind media source-interface Loopback0
dtmf-relay rtp-nte sip-kpml
codec g711ulaw
ip qos dscp cs3 signaling
no vad
!
dial-peer voice 30 voip
description Calls to/from PSTN
lpcor outgoing PSTN
session protocol sipv2
session target ipv4:198.51.100.1:5060
session transport tcp
destination e164-pattern-map 30
incoming uri via 30
voice-class sip profiles 30 ! Omitted from example
voice-class sip options-keepalive profile 1 ! Omitted from example
voice-class sip bind control source-interface Loopback0
voice-class sip bind media source-interface Loopback0
dtmf-relay rtp-nte sip-kpml
codec g711ulaw
ip qos dscp cs3 signaling
no vad
!
VIP Advisor

Re: SIP dialpeers, "show dialplan number" formatting.

Wow, first use of LPCOR I've ever seen. Nice one! Plus the config is clean! I prefer separate in/out peers myself, but I see what you're doing here.

PS Your third dial-peer is also 10. Should be 30 per your convention at the top.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.

Re: SIP dialpeers, "show dialplan number" formatting.

Thanks Anthony and fixed.

If the platform supports classic COR you can use that instead of LPCOR. They didn’t port it to IOS XE on ASR 1k so I had to learn LPCOR. I honestly haven’t tried classic COR on ISR 4k now that I have a known-working template.
VIP Advisor

Re: SIP dialpeers, "show dialplan number" formatting.

UDP is the default transport on CUBE; why did you specify it? Also, you should consider supporting an out of band DTMF relay, so you avoid MTP allocations, or plain broken DTMF. (E.g., UCCX does not support inband DTMF)

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
VIP Mentor

Re: SIP dialpeers, "show dialplan number" formatting.

have you tried..

sh dialplan number +9999+4525446346

Please rate all useful posts
Contributor

Re: SIP dialpeers, "show dialplan number" formatting.

Doesn't help:

inti-vgw1#sh dialplan number +9999+4525446346
Incorrect format for E.164 Number
regular expression must be of the form ^((\+)?([0-9,#*A-F])+)$

fortvald
Participant

Re: SIP dialpeers, "show dialplan number" formatting.

Try this...

 

uk-lon-dc-voice-r1#sho dialplan number +9999*4525446346
Macro Exp.: +9999*4525446346
No match, result=1(MORE_DIGITS_NEEDED)

Please remember to rate useful posts, click on the stars below.
VIP Advisor

Re: SIP dialpeers, "show dialplan number" formatting.

Destination patterns are left justified. So, +9999 and +9999T are the same. The only reason you need the T is if you are receiving the digits one by one. If you are just using SIP dial-peers, and no phones or certain PRIs which require this feature, then you can get rid of the T.

You stated in your opening "use DialPeerGroup to select outgoing dialpeer", but I don't see the use of DPG in your sample config. You posted DP 4620, with a reference to DGP 4600, but I cannot see the DPG 4600 to tell what's in it. Also, if you do end up using DPG at the end of the day, the destination pattern (or in your case the e164 map) is required to make this DP an outgoing DP, but it's ignored, and not used. Therefore, trying to match it with show dialplan number is pointless.

I don't typically use DPG, but when I do, I just set the destination pattern to something which makes sense, so that the unaware Engineer doesn't look at it and go "Well, that will never match anything, so it must be wrong."

As far as your prefixing is concerned, I think a mistake you might be making is to use the + in the middle of the number. This should and in some cases can only be used at the beginning of the number. The regular expression the CLI is giving you is pretty much describing the format, and having a plus sign (escaped too mind you), anywhere but at the front of the number is not supported.

My recommendation would be to go back to CUCM and pick a digit manip which removes the plus, and prefixes the number in place of the plus, then CUBE can remove the prefix and replace the plus.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards