cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1809
Views
20
Helpful
7
Replies

Dial Peer Preferance - POTS & VOIP

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

 

1 Accepted Solution

Accepted Solutions

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.



Response Signature


View solution in original post

7 Replies 7

Variable-Length Matching

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.

 



Response Signature


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

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.



Response Signature


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.



Response Signature


Thx Nithin for trying to help

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



Response Signature