09-21-2023 07:43 AM - edited 09-21-2023 07:46 AM
Hello everyone,
I have set up CME and CUBE on ISR4331 and connected SIP trunk from telco provider. Outbound calls are working fine, but I can't setup dialpeer to match incoming calls and forward to connected IP phone. Dialpeer is set up as follows:
dial-peer voice 380 voip
translation-profile incoming IN
destination-pattern +38..........
session protocol sipv2
session target dns:sip.zadarma.com
voice-class codec 1
voice-class sip dtmf-relay force rtp-nte
dtmf-relay rtp-nte
clid network-number 310405
voice translation-rule 10
rule 1 /.*/ /10/
!
!
voice translation-profile IN
translate called 10
10 from translation rule is internal number.
Attached debug logs. Looks like communication with provider is stuck on SIP INVITE during incoming call from it.
Any help would be appreciated! Thanks in advance.
09-21-2023 08:40 AM - edited 09-21-2023 08:43 AM
It’s not really recommended to use destination number to match an inbound dial peer. And if you were to use that it doesn’t use DNIS, it used ANI. See this document for more information on how call routing works in IOS. Explain Cisco IOS and IOS XE Call Routing
It would be recommended to use information in the VIA header to match your inbound dial peer. Also an inbound dial peer doesn’t use a session target, that’s an outbound configuration element.
09-21-2023 11:47 AM
Hello and thank you for the response.
Yeah, it's definitely not the best idea to match inbound call using destination-pattern. I'm now matching it using incoming called-number. However this didn't help.
I have noticed in logs that it does not even try to do dial peer match. So..... I figured out that whitelist of incoming SIP servers is mandatory config option:
voice service voip
ip address trusted list
ipv4 185.45.152.0 255.255.255.0
..........
Now it works.
09-21-2023 12:25 PM
That’s great. It is needed to allow any IP to communicate that is not explicitly defined as a destination in an outbound dial peer as that would automatically be allowed to communicate.
On the match, it’s not recommended to use that either, as I wrote in my initial reply use of the VIA header is the best option.
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