12-17-2019 11:16 PM
Hi.
I have an ISR 4321 cisco with 2 SIP trunk from the same provider (different dns and assigned numbers of course). Therefore, I would like specific extensions to go through specific dial-peers that point to SIP trunks that have the corresponding output number. How can I achieve this? I tried for preferences and it didn't work. Is there any way that I can classify the source extension and redirect calls to a dial-peer?
Thanks.
Solved! Go to Solution.
12-28-2019 10:58 AM
I'm not entirely sure as you've obscured the actual destination patterns, but I think you may be expecting the destination patterns of DP 10, 11, 20 and 21 to distinguish National from International calls. They won't. If the call is routed by Dial Peer Group the outgoing dial peer's destination pattern is not used. Selection is based on group membership and priority only. When I use DPGs I generally give a destination pattern that's clearly nonsense just so that anyone viewing the configuration is not misled.
If you want separate National and International dial peers, maybe Class of Restriction is the way to go. Set up COR on the incoming and out going dial peers such that a call received on say DP 100 can only "see" DP 10 and 11, but dial peer selection will still be based on dialled number.
12-18-2019 05:08 AM
Check out dial-peer groups (DPG):
12-18-2019 08:29 AM
12-18-2019 08:52 AM
Yes, inbound dial-peer has to be matched to trigger the DPG. Depending on difference between the 2 incoming calls URI class can be used, i.e. using VIA if coming from difference SIP SBCs, To if destined to different CUBE interface. etc. If all calls come from same SBCs to the same CUBE interface then we would need to know what the distinction is, if for example it's based on called number then you can use incoming called-number with applied e164-map, etc.
12-18-2019 05:09 PM - edited 12-18-2019 05:10 PM
Hi @Chris Deren and @Anthony Holloway . First of all thank you very much for your answers.
From what explain to me, I must make a mixture of both comments. After reading the documents sent to me, I think there would be something like this:
dial-peer voice 10 voip
destination-pattern xxxx (National calls)
session target dns1
dial-peer voice 11 voip
destination-pattern xxxx (International Calls)
session target dns1
dial-peer voice 20 voip
destination-pattern xxxx (National calls)
session target dns2
dial-peer voice 21 voip
destination-pattern xxxx (International Calls)
session target dns2
voice class e164-pattern-map 1
description E164 Pattern Map for calling internal extensions
e164 19.$
e164 20[2-9]$
e164 2[1-9].$
***There are specifics internal extensions that I want route to second SIP **
voice class e164-pattern-map 2
description E164 Pattern Map for calling internal extensions
e164 20[0-1]$
voice class dpg 1
dial-peer 10 preference 1
dial-peer 11 preference 2
dial-peer voice 100 voip
destination calling e164-pattern-map 1
destination dpg 1
voice class dpg 2
dial-peer 20 preference 1
dial-peer 21 preference 2
dial-peer voice 200 voip
destination calling e164-pattern-map 1
destination dpg 2
I have to test in my ISR, so I just that yours can check it.
Regards.
12-19-2019 10:28 AM
12-19-2019 07:51 PM
Do you say it for xxx? It is only referential, in that field the corresponding destination numbers will go. I did it as an example
12-20-2019 08:23 AM
12-20-2019 06:55 PM
Sorry friend @Anthony Holloway , I don´t understand to you.
should not be the dial-peer 10,11,20 & 21 for output?
12-23-2019 08:43 AM - edited 12-27-2019 09:27 AM
The thing I'm trying to tell you can be illustrated below. Imagine a caller dials the number 3000, the construct below will still work, and will route the call for the caller, despite the destination pattern being 2000. Note: Not all dial-peer config shown, just the bits needed to illustrate the point.
voice class dpg 2 dial-peer 2 ! dial-peer voice 1 voip
incoming called-number . destination dpg 2 ! dial-peer voice 2 voip destination-pattern 2000 !
12-26-2019 09:07 PM
Hi @Anthony Holloway thanks for your answer.
I understand now your point. But according my propose configuration, do you agree?
Merry Christmas
12-27-2019 09:29 AM
12-28-2019 10:11 AM - edited 12-28-2019 10:15 AM
Oh no ... What I am trying to do with this configuration is that if the incoming call is from the specific internal extensions choose the dial-peer 100 input and the dial-peer 10 & 11 output, for national and international calls respectively by the SIP trunk 1 .
In the case of the extensions that I require, go out the SIP trunk 2, my idea is to choose the dial-peer 200 input and the dial-peer 20 & 21 output for national and international calls respectively.
Maybe I should change it as follows, according yours comments:
dial-peer voice 10 voip
destination-pattern xxxx (National calls through SIP 1)
session target dns1
dial-peer voice 11 voip
destination-pattern xxxx (International Calls through SIP 1)
session target dns1
dial-peer voice 20 voip
destination-pattern xxxx (National calls through SIP 2)
session target dns2
dial-peer voice 21 voip
destination-pattern xxxx (International Calls through SIP 2)
session target dns2
voice class dpg 1
dial-peer 10 preference 1
dial-peer 11 preference 1
dial-peer voice 100 voip
incoming calling e164-pattern-map 1
destination dpg 1
voice class dpg 2
dial-peer 20 preference 1
dial-peer 21 preference 1
dial-peer voice 200 voip
incomimg calling e164-pattern-map 1
destination dpg 2
Regards.
12-28-2019 10:58 AM
I'm not entirely sure as you've obscured the actual destination patterns, but I think you may be expecting the destination patterns of DP 10, 11, 20 and 21 to distinguish National from International calls. They won't. If the call is routed by Dial Peer Group the outgoing dial peer's destination pattern is not used. Selection is based on group membership and priority only. When I use DPGs I generally give a destination pattern that's clearly nonsense just so that anyone viewing the configuration is not misled.
If you want separate National and International dial peers, maybe Class of Restriction is the way to go. Set up COR on the incoming and out going dial peers such that a call received on say DP 100 can only "see" DP 10 and 11, but dial peer selection will still be based on dialled number.
12-29-2019 01:38 PM
Hi @TONY SMITH , thanks for you reply.
I understand your point. I´ll check Class of restriction, and I´ll come back to leave you my comments.
Really thanks
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