Tuesday, December 15, 2009

incoming dial-peers

I had an interesting troubleshooting experience that showed me that I didn't fully understand how incoming dial-peers work with POTS lines.

I had a simple H.323 config that hands off a call arriving on an FXO port to CallManager:

voice-port 1/0/2
connection plar 7001
description POTS line
caller-id enable

dial-peer voice 7001 voip
destination-pattern 700.
session target ipv4:10.1.1.100
dtmf-relay h245-alphanumeric


When a call was placed to the line connected to the FXO port on 1/0/2, the call would be sent to the IP phone with the wrong caller ID.

I ran a "debug voip ccapi" and discovered that the incoming dial-peer was not the default dial-peer 0, but another dial-peer (numbers sanitized):

dial-peer voice 1000 pots
description 555-1212
destination-pattern 1212
clid network-number 9705551212
port 1/0/2


This dial-peer had accidentally been left active from a prior configuration, and its "clid network-number" command was thus overwriting the correct caller ID.

I didn't know this previously, but it turns out that an incoming POTS dial peer is matched if it has a "port" statement equal to the inbound voice-port, AND any one of the following three commands is present:

incoming called-number
answer-address
destination-pattern

Removing the destination-pattern command or removing the dial-peer entirely corrects the problem and causes dial-peer 0 to be matched inbound.

3 comments:

Unknown said...

Quick question, was your second command snippet supposed to show 1/0/2?

Related to an experience I had. I didn't have the network number configured, but it had a destination-pattern command configured, and the caller ID was being overwritten by the destination-pattern command which in our case was 911. They were getting calls with a 911 caller-id, which was somewhat comical. This happened because the incoming caller-id was null.

And your reference is correct. The incoming call will try to match the dialed number against incoming called-number, or the calling number(caller-id) on answer address as a second choice. If neither of those commands are present on a port-matching dial-peer it will match the caller-id against the destination-pattern.

-Greg Hinson

Jay Swan said...

Thanks for catching the typo Greg!

Samuel Indonesia said...

Forum Nice Post ,I Like This Post ,thanks for sharing