06-19-2018 12:25 PM - edited 03-17-2019 01:02 PM
So i had incoming calls work before with a test number received from the provider. Today they changed the number on their end to what it's suppose to be and incoming calls are now failing with message 500 internal server error and cause 16. Why is the call failing?
Call flow is like this PSTN==>CME==>IP phone
dial-peer voice 200 voip
description ** Incoming dialpeer sip-trunk calls **
Destination-pattern 21
session protocol sipv2
session target sip-server
session transport udp
incoming called-number .
dtmf-relay rtp-nte
codec g711alaw
no vad
06-19-2018 01:04 PM
Hi @Ansik
If this can help you about the error 500 internal server.
06-19-2018 01:29 PM
The call is looping back to the PSTN.
It's hitting dial peer 2 on the inbound leg and hitting dial peer 3 for the outbound leg.
Can you upload the outputs of:
show version
show config
show dial-peer voice summary
Thanks!
06-20-2018 07:33 AM
attached outputs
06-20-2018 08:02 AM
Hi Ansik,
The inbound call has a DNIS of 475994:
Received:
INVITE sip:475994@10.114.11.18:5060;user=phone SIP/2.0
That matches dial peer 2 because of the "incoming called-number." here:
dial-peer voice 2 voip
destination-pattern 21
session protocol sipv2
session target sip-server
session transport udp
incoming called-number .
dtmf-relay rtp-nte
no vad
Because there is no translation rule it will hunt for a destination pattern that matches the DNIS of 475994.
The only dial peer that will match a six digit number is dial peer 3:
dial-peer voice 3 voip
description ** Outgoing dialpeer Landline Calls **
destination-pattern [2-6].....$
session protocol sipv2
session target sip-server
session transport udp
dtmf-relay rtp-nte
codec g711alaw
no vad
Since your phones all have two digit extensions you will need to add a translation rule to the incoming peer to translate the DNIS to the desired ephone dn number.
Which phone should this call route to? Even if you strip the DNIS to the last two digits you get 94 which does not match any IP phone's DN.
06-20-2018 09:27 AM
06-20-2018 10:18 AM
That translation rule should work assuming it was applied on the dial peer correctly. But, now that you pointed out the destination number is 21 you have an overlapping dial plan. The virtual dial-peer 20005 and the configured peer 2 both have destination patterns of 21. Peer 2 routes it back to the PSTN.
Can you re-apply the translation rule to peer 2 with this command and remove the destination pattern:
dial-peer 2 voice 2 voip
translation-profile incoming INCOMING-CALLS
no destination-pattern 21
Then, make a test call and get the following debugs:
debug ccsip message
debug voip ccapi inout
debug sccp events
debug sccp packets
Thanks!
06-20-2018 10:33 AM
06-21-2018 07:54 AM
attached the log.
i have added the translation rule to the dial-peer . the call is still failing
dial-peer voice 2 voip
description ** Incoming dialpeer sip-trunk calls **
translation-profile incoming INCOMING-CALLS
session protocol sipv2
session target sip-server
session transport udp
incoming called-number .
dtmf-relay rtp-nte
codec g711alaw
no vad
!
voice translation-rule 2
rule 1 /47..../ /21/
!
voice translation-profile INCOMING-CALLS
translate called 2
Also i modified dial-peer 3 so it doesnt overlap anymore to
dial-peer voice 3 voip
description ** Outgoing dialpeer Landline Calls **
destination-pattern 0[2-6].....$
session protocol sipv2
session target sip-server
session transport udp
dtmf-relay rtp-nte
codec g711alaw
no vad
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