04-11-2021 01:11 AM
Good Morning Colleagues
I hope you are doing good and safe.
I have configured 2 dial-peers , One for VOIP (SIP trunk to third IP PBX) and another POTS for outbound/incoming calls to & from PSTN.
The extensions at the third party IP PBX are 1xx . So i configure the below dial peers:
dial-peer voice 20010 voip
translation-profile outgoing TEST-CALLING
preference 2
destination-pattern 1..
session protocol sipv2
session target ipv4:192.168.1.71
voice-class codec 1
dtmf-relay rtp-nte
no vad
!
dial-peer voice 10000 pots
preference 1
destination-pattern .T
port 0/0/0
The problem that when trying to dial any external number that start with "1" that should be routed to PSTN but CISCO incorrectly takes only the first 3 digits and dial them through VOIP dial peer in spite of the fact that POTS dial peer has preference higher than VOIP dial peer.
Example 1: If i try to dial 19777 , It should go through POTS but incorrectly CISCO takes the first three digits "197" and try to dial and reach them through third party IP PBX.
Example 2: If i try to dial [2 to 9]9777 , It worked as expected and go through POTS.
So kindly advice how can i solve this issue.
Best Regards
Solved! Go to Solution.
04-11-2021 05:14 AM - edited 04-11-2021 05:31 AM
The preference has not the highest value when selecting the dial peer. In your specific case as you have overlap between the two dial peers, which in itself is a seriously bad idea to have, you would need to use additional information to define what dial peer to use for what.
For your calls to PSTN don’t you use a breakout code, for example 0 or 9, to have CM send the call to the voice gateway? If so I would recommend you to keep that intact as the call traverse to the gateway from CM and use it in the dial peer and then remove it before sent to the service provider. You could also possibly prefix digits in front of the called number for the calls to the PBX extension, making them not overlap with the dial string used for PSTN calls. This prefix would then be dropped in the dial peer before the call is sent to the PBX.
There are many ways to achieve this, it’s in the end a matter of preference. Again in general it is a very bad idea to have overlaps as it brings so many challenges to the table.
04-11-2021 04:33 AM
When matching dial peers, the router defaults to variable-length matching, which means that as long as the left-justified digits in the dial string match the configured pattern in the dial peer, any digits beyond the configured pattern are ignored for the purposes of matching. For example, dial string 5551212 would match both of the following dial peers:
dial-peer voice 1 voip destination-pattern 555 session target ipv4:10.10.1.1 dial-peer voice 2 voip destination-pattern 5551212 session target ipv4:10.10.1.2
To disable variable-length matching for a dial peer, add the dollar sign ($) to the end of the destination pattern, as shown:
dial-peer voice 1 voip destination-pattern 555$ session target ipv4:10.10.1.1
The $ character in the configuration prevents this dial peer from being matched for dial string 5551212 because the extra digits beyond 555 are considered in the matching.
04-11-2021 05:03 AM
Good Afternoon Nithin
Thx for your message . I updated my configuration but i a still facing the same issue . Below is my updated configuration:
dial-peer voice 20010 voip
translation-profile outgoing TEST-CALLING
preference 2
destination-pattern 1..$
session protocol sipv2
session target ipv4:192.168.1.71
voice-class codec 1
dtmf-relay rtp-nte
no vad
!
dial-peer voice 10000 pots
preference 1
destination-pattern .T
port 0/0/0
Any other suggestions ?
Best Regards
04-11-2021 05:14 AM - edited 04-11-2021 05:31 AM
The preference has not the highest value when selecting the dial peer. In your specific case as you have overlap between the two dial peers, which in itself is a seriously bad idea to have, you would need to use additional information to define what dial peer to use for what.
For your calls to PSTN don’t you use a breakout code, for example 0 or 9, to have CM send the call to the voice gateway? If so I would recommend you to keep that intact as the call traverse to the gateway from CM and use it in the dial peer and then remove it before sent to the service provider. You could also possibly prefix digits in front of the called number for the calls to the PBX extension, making them not overlap with the dial string used for PSTN calls. This prefix would then be dropped in the dial peer before the call is sent to the PBX.
There are many ways to achieve this, it’s in the end a matter of preference. Again in general it is a very bad idea to have overlaps as it brings so many challenges to the table.
04-11-2021 05:45 AM
Thx Roger
04-11-2021 05:25 AM
As @roger mentioned use a specific pattern instead of .T in pots dial-peer or use a prefix to differentiate the calls. Its not a best practice to use such overlapping dial-peer.
04-11-2021 05:46 AM
Thx Nithin for trying to help
04-11-2021 05:30 AM
For additional details on what I referenced with preference not being the highest value for selection please have a look at this document. https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/voice/dialpeer/configuration/15-mt/vd-15-mt-book/vd-dp-feat-cfg.html
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide