How to configure a 2821 ISR to an asterisk PBX on a PRI line?

1 down vote favorite

I’m trying to move my company’s phone system from Cisco’s CUCM to an asterisk solution.

I have setup a PBXinaflash server, and setup an account with www.vitelity.com. I was able to get it working. I could send/receive calls, and it connected to an IVR.

Next I bought a Cisco 2821 ISR with a PRI card, as a backup for our current VOIP gateway. I was was able to load our current configuration on it, and after plugging in the PRI line it worked with our Cisco CUCM.

After that I did a goggle search on how to reconfigure the 2821. I downloaded the Cisco documentation on it, and found some example on Google. After my first try I was able to make outgoing phone calls. I was able to call a IVR and get it to recognize the digits I was dialing. The other phones Called ID showed the correct caller ID for us. The problem was getting incoming calls to work. So far I have gotten it to make a clicking sound, a dial tone, all line busy, and ring without any real phones ringing.

My objective it to get our asterisk IVR to pickup all calls on any of our phone numbers. We have ~150 DIDs, but only 4 are really used for anything.

My question is has anyone got this type of setup working? Is it possible? Could you share you configurations with me?

I think the problem is either the config for the 2821 or the trunk config in asterisk.

[Cisco 2821 ISR ~ 10.1.10.252]

voice rtp send-recv
!
voice service voip 
 allow-connections h323 to h323
 allow-connections h323 to sip
 allow-connections sip to h323
 allow-connections sip to sip
 redirect ip2ip
 signaling forward unconditional
 fax protocol cisco 
 sip
  bind control source-interface GigabitEthernet0/1
  bind media source-interface GigabitEthernet0/1
!
voice-card 0
 dspfarm
!
archive
 log config
  hidekeys
!
controller T1 0/1/0
 pri-group timeslots 1-24
!
interface GigabitEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface GigabitEthernet0/1
 ip address 10.1.10.252 255.255.255.0
 duplex auto
 speed auto
!
interface Serial0/1/0:23
 no ip address
 encapsulation hdlc
 isdn switch-type primary-ni
 isdn incoming-voice voice
 isdn calling-number 3167945555
 isdn supp-service name calling
 no cdp enable
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 10.1.10.253
no ip http server
no ip http secure-server
!
control-plane
!
voice-port 0/1/0:23
!
no mgcp package-capability res-package
no mgcp package-capability fxr-package
no mgcp timer receive-rtcp
no mgcp explicit hookstate
!
dial-peer voice 1 pots
 numbering-type unknown
 destination-pattern .
 direct-inward-dial
 port 0/1/0:23
 forward-digits all
!
dial-peer voice 2 voip
 numbering-type unknown
 destination-pattern .
 session protocol sipv2
 session target ipv4:10.1.10.7:5060
 session transport udp
 dtmf-relay rtp-nte
 codec g711ulaw
!
gateway 
 timer receive-rtp 1200
!
sip-ua 
 retry invite 3
 retry response 3
 retry bye 3
 retry cancel 3
 timers trying 1000
 sip-server ipv4:10.1.10.7
!
line con 0
 transport output telnet
line aux 0
 transport output telnet
line vty 0 4
 login
 transport input telnet
line vty 5 15
 login
 transport input telnet
!
scheduler allocate 20000 1000
end

[asterisk trunk ~ 10.1.10.7]

Outgoing Settings

Trunk Name:
cisco2821

PEER Details:
type=friend
qualify=yes
nat=no
insecure=very
host=10.1.10.252
dtmfmode=rfc2833
disallow=all
context=from-internal
allow=ulaw&alaw

Incoming Settings

USER Context:
from-internal

USER Details:
type=friend
qualify=yes
nat=no
host=10.1.10.252
dtmfmode=rfc2833
disallow=all
context=from-trunk
canreinvite=no
allow=ulaw&alaw

You don’t need two peers, just one in from-pstn context.

Also, insecure=port,invite the very is deprecated (but I think FreePBX fixes this for you).

Also you don’t need alaw CODEC.

You have everything set right except the dial peer. I think you are looping. You need to have a more specific dial peer that matches your DID’s. This will have two functions 1) if anyone inside dials your DID it will loop right back 2) Keep the box from sending the call back to itself.

So your dial-peer VOip needs to be NXXNPAxxxx where xxxx is your range (or just use the 100’s place).

Does this make sense?

Other option if you want to send all digits is to add a dial prefix in Asterisk then add that to your dial-peer POTS

You are correct about the looping, if you called an outside number it worked, but if you called one of our DIDs it would get get stuck in a loop.

The examples of dial-peers all had more specific numbers, but I didn’t understand how to mach my numbers correctly. Our internal extensions are in the range of 100 to 199. Our test block of external DID’s are 3167944500 to 3167944599. I want to make it so that if any of those DIDs are called the asterisk IRV would pick up the call. We also have a few 1800 numbers and a few assorted numbers not in a block, they all start with 316794… would I need a separate dial-peer for each of them?

How do you add a dial prefix in Asterisk? And what would I add to the POTS dial-peer? Would I replace the “all” will the DID?

So should the new dial-peers be…

dial-peer voice 1 pots
numbering-type unknown
destination-pattern .
direct-inward-dial
port 0/1/0:23
forward-digits all
!
dial-peer voice 2 voip
numbering-type unknown
destination-pattern 31679445…
session protocol sipv2
session target ipv4:10.1.10.7:5060
session transport udp
dtmf-relay rtp-nte
codec g711ulaw

OK I have delete the “USER Details” and, changed the “PEER Details” too…

type=friend
qualify=yes
nat=no
insecure=port,invite
host=10.1.10.252
dtmfmode=rfc2833
disallow=all
context=from-pstn
allow=ulaw

Those changes didn’t allow incoming calls, and broke outgoing calls.

I will reset the config back to what I stated with, and try each change one by one and try and figure out which change broke it.

I don’t think 1 period will work, that only allows one digit. Here is a working dial plan out of mine.

You need to learn to use the Cisco debug ‘ccsip calls’ for SIP stuff and ‘debug voice dialpeer inout’ don’t forget to set ‘term mon’ for local log copy or a syslog server to see the output.

OK I will look into using those debug commands today. I exec them and got see below, but I don’t have the PRI line plug in yet.

Your example didn’t post, could you try that again?

*Sep 11 14:29:59.124: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:
Calling Number=Unknown, Called Number=, Voice-Interface=0x0,
Timeout=TRUE, Peer Encap Type=ENCAP_VOIP, Peer Search Type=PEER_TYPE_VOICE,
Peer Info Type=DIALPEER_INFO_SPEECH
*Sep 11 14:29:59.124: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:
Result=NO_MATCH(-1) After All Match Rules Attempt

I’ll post a log of my next test, should be able to do one after work today.

Sep 11 14:29:59.124: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:
Result=NO_MATCH(-1) After All Match Rules Attempt

This alone shows you don’t have a matching dial peer.

That is an odd one; it was doing that; but I was not making a call and the PRI line was not connected. So why did it think a call was occurring?

The log turned out to be 7412 line so I’ll try to post just one phone call of it. I setup a Google voice account with the number 3162471029, and I was trying to call our main office number 3167942200. From the Google interface I dialed the full 10 digits, the the log only show the last 7 digits 7942200. I guess that was our PRI line provider, Cox who changed that.

Wed Sep 11 17:12:04 2013: <191>9027: *Sep 11 16:45:40.258 GMT: //-1/B792A1AA8120/DPM/dpMatchPeersCore: Wed Sep 11 17:12:04 2013: <191>9028: Wed Sep 11 17:12:04 2013: <191>9029: Calling Number=, Called Number=7942200, Peer Info Type=DIALPEER_INFO_SPEECH Wed Sep 11 17:12:04 2013: <191>9030: *Sep 11 16:45:40.258 GMT: //-1/B792A1AA8120/DPM/dpMatchPeersCore: Wed Sep 11 17:12:04 2013: <191>9031: Match Rule=DP_MATCH_DEST; Called Number=7942200 Wed Sep 11 17:12:04 2013: <191>9032: *Sep 11 16:45:40.258 GMT: //-1/B792A1AA8120/DPM/dpMatchPeersCore: Wed Sep 11 17:12:04 2013: <191>9033: Result=Success(0) after DP_MATCH_DEST Wed Sep 11 17:12:04 2013: <191>9034: *Sep 11 16:45:40.258 GMT: //-1/B792A1AA8120/DPM/dpMatchPeersMoreArg: Wed Sep 11 17:12:04 2013: <191>9035: Result=SUCCESS(0) Wed Sep 11 17:12:04 2013: <191>9036: List of Matched Outgoing Dial-peer(s): Wed Sep 11 17:12:04 2013: <191>9037: 1: Dial-peer Tag=1 Wed Sep 11 17:12:04 2013: <190>9038: *Sep 11 16:45:40.258 GMT: %CALL_CONTROL-6-NUMBERING_TYPE_NO_MATCH: The called number numbering type did not matchThe event for the callid 1 is being discarded. Wed Sep 11 17:12:04 2013: <190>9039: Wed Sep 11 17:12:05 2013: <191>9040: *Sep 11 16:45:40.258 GMT: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore: Wed Sep 11 17:12:05 2013: <191>9041: Calling Number=., Called Number=, Voice-Interface=0x0, Wed Sep 11 17:12:05 2013: <191>9042: Timeout=TRUE, Peer Encap Type=ENCAP_VOIP, Peer Search Type=PEER_TYPE_VOICE, Wed Sep 11 17:12:05 2013: <191>9043: Peer Info Type=DIALPEER_INFO_SPEECH Wed Sep 11 17:12:05 2013: <191>9044: *Sep 11 16:45:40.258 GMT: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore: Wed Sep 11 17:12:05 2013: <191>9045: Result=NO_MATCH(-1) After All Match Rules Attempt Wed Sep 11 17:12:05 2013: <191>9046: *Sep 11 16:45:41.094 GMT: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore: Wed Sep 11 17:12:05 2013: <191>9047: Calling Number=., Called Number=, Voice-Interface=0x0, Wed Sep 11 17:12:05 2013: <191>9048: Timeout=TRUE, Peer Encap Type=ENCAP_VOIP, Peer Search Type=PEER_TYPE_VOICE, Wed Sep 11 17:12:05 2013: <191>9049: Peer Info Type=DIALPEER_INFO_SPEECH Wed Sep 11 17:12:06 2013: <191>9050: *Sep 11 16:45:41.094 GMT: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore: Wed Sep 11 17:12:06 2013: <191>9051: Result=NO_MATCH(-1) After All Match Rules Attempt Wed Sep 11 17:12:06 2013: <191>9052: *Sep 11 16:45:42.474 GMT: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore: Wed Sep 11 17:12:06 2013: <191>9053: Calling Number=3162471029, Called Number=7942200, Voice-Interface=0x49899704, Wed Sep 11 17:12:06 2013: <191>9054: Timeout=TRUE, Peer Encap Type=ENCAP_VOICE, Peer Search Type=PEER_TYPE_VOICE, Wed Sep 11 17:12:06 2013: <191>9055: Peer Info Type=DIALPEER_INFO_SPEECH Wed Sep 11 17:12:06 2013: <191>9056: *Sep 11 16:45:42.474 GMT: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore: Wed Sep 11 17:12:06 2013: <191>9057: Result=Success(0) after DP_MATCH_ORIGINATE; Incoming Dial-peer=1 Wed Sep 11 17:12:06 2013: <191>9058: *Sep 11 16:45:42.474 GMT: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore: Wed Sep 11 17:12:06 2013: <191>9059: Wed Sep 11 17:12:06 2013: <191>9060: Calling Number=3162471029, Called Number=7942200, Voice-Interface=0x0, Wed Sep 11 17:12:06 2013: <191>9061: Timeout=TRUE, Peer Encap Type=ENCAP_VOICE, Peer Search Type=PEER_TYPE_VOICE, Wed Sep 11 17:12:06 2013: <191>9062: Peer Info Type=DIALPEER_INFO_FAX Wed Sep 11 17:12:06 2013: <191>9063: *Sep 11 16:45:42.474 GMT: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore: Wed Sep 11 17:12:06 2013: <191>9064: Result=NO_MATCH(-1) After All Match Rules Attempt Wed Sep 11 17:12:06 2013: <191>9065: *Sep 11 16:45:42.474 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore: Wed Sep 11 17:12:06 2013: <191>9066: Calling Number=, Called Number=7942200, Peer Info Type=DIALPEER_INFO_SPEECH Wed Sep 11 17:12:06 2013: <191>9067: *Sep 11 16:45:42.474 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore: Wed Sep 11 17:12:06 2013: <191>9068: Match Rule=DP_MATCH_DEST; Called Number=7942200 Wed Sep 11 17:12:06 2013: <191>9069: *Sep 11 16:45:42.474 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore: Wed Sep 11 17:12:06 2013: <191>9070: Wed Sep 11 17:12:06 2013: <191>9071: Result=Success(0) after DP_MATCH_DEST Wed Sep 11 17:12:06 2013: <191>9072: *Sep 11 16:45:42.474 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchPeers: Wed Sep 11 17:12:06 2013: <191>9073: Result=SUCCESS(0) Wed Sep 11 17:12:06 2013: <191>9074: List of Matched Outgoing Dial-peer(s): Wed Sep 11 17:12:06 2013: <191>9075: 1: Dial-peer Tag=1 Wed Sep 11 17:12:06 2013: <191>9076: *Sep 11 16:45:42.482 GMT: //-1/B8D312608121/DPM/dpMatchPeersCore: Wed Sep 11 17:12:06 2013: <191>9077: Calling Number=, Called Number=7942200, Peer Info Type=DIALPEER_INFO_SPEECH Wed Sep 11 17:12:06 2013: <191>9078: *Sep 11 16:45:42.482 GMT: //-1/B8D312608121/DPM/dpMatchPeersCore: Wed Sep 11 17:12:06 2013: <191>9079: Match Rule=DP_MATCH_DEST; Called Number=7942200 Wed Sep 11 17:12:06 2013: <191>9080: *Sep 11 16:45:42.482 GMT: //-1/B8D312608121/DPM/dpMatchPeersCore: Wed Sep 11 17:12:06 2013: <191>9081: Result=Success(0) after DP_MATCH_DEST Wed Sep 11 17:12:06 2013: <191>9082: *Sep 11 16:45:42.482 GMT: //-1/B8D312608121/DPM/dpMatchPeersMoreArg: Wed Sep 11 17:12:06 2013: <191>9083: Result=SUCCESS(0) Wed Sep 11 17:12:06 2013: <191>9084: Wed Sep 11 17:12:06 2013: <191>9085: List of Matched Outgoing Dial-peer(s): Wed Sep 11 17:12:06 2013: <191>9086: 1: Dial-peer Tag=1 Wed Sep 11 17:12:06 2013: <191>9087: *Sep 11 16:45:42.482 GMT: //-1/B8D312608121/DPM/dpMatchPeersCore: Wed Sep 11 17:12:06 2013: <191>9088: Calling Number=, Called Number=7942200, Peer Info Type=DIALPEER_INFO_SPEECH Wed Sep 11 17:12:06 2013: <191>9089: *Sep 11 16:45:42.482 GMT: //-1/B8D312608121/DPM/dpMatchPeersCore: Wed Sep 11 17:12:06 2013: <191>9090: Match Rule=DP_MATCH_DEST; Called Number=7942200 Wed Sep 11 17:12:06 2013: <191>9091: *Sep 11 16:45:42.482 GMT: //-1/B8D312608121/DPM/dpMatchPeersCore: Wed Sep 11 17:12:06 2013: <191>9092: Result=Success(0) after DP_MATCH_DEST Wed Sep 11 17:12:06 2013: <191>9093: *Sep 11 16:45:42.482 GMT: //-1/B8D312608121/DPM/dpMatchPeersMoreArg: Wed Sep 11 17:12:06 2013: <191>9094: Result=SUCCESS(0) Wed Sep 11 17:12:06 2013: <191>9095: List of Matched Outgoing Dial-peer(s): Wed Sep 11 17:12:06 2013: <191>9096: 1: Dial-peer Tag=1 Wed Sep 11 17:12:06 2013: <191>9097: *Sep 11 16:45:42.482 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore: Wed Sep 11 17:12:06 2013: <191>9098: Wed Sep 11 17:12:06 2013: <191>9099: Calling Number=7942200, Called Number=7942200, Peer Info Type=DIALPEER_INFO_SPEECH Wed Sep 11 17:12:06 2013: <191>9100: *Sep 11 16:45:42.486 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore: Wed Sep 11 17:12:06 2013: <191>9101: Match Rule=DP_MATCH_DEST; Called Number=7942200 Wed Sep 11 17:12:06 2013: <191>9102: *Sep 11 16:45:42.486 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore: Wed Sep 11 17:12:06 2013: <191>9103: Result=Success(0) after DP_MATCH_DEST Wed Sep 11 17:12:06 2013: <191>9104: *Sep 11 16:45:42.486 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersMoreArg: Wed Sep 11 17:12:06 2013: <191>9105: Result=SUCCESS(0) Wed Sep 11 17:12:06 2013: <191>9106: List of Matched Outgoing Dial-peer(s): Wed Sep 11 17:12:06 2013: <191>9107: 1: Dial-peer Tag=1 Wed Sep 11 17:12:06 2013: <191>9108: *Sep 11 16:45:42.486 GMT: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore: Wed Sep 11 17:12:06 2013: <191>9109: Wed Sep 11 17:12:06 2013: <191>9110: Calling Number=7942200, Called Number=, Voice-Interface=0x0, Wed Sep 11 17:12:06 2013: <191>9111: Timeout=TRUE, Peer Encap Type=ENCAP_VOIP, Peer Search Type=PEER_TYPE_VOICE, Wed Sep 11 17:12:06 2013: <191>9112: Peer Info Type=DIALPEER_INFO_SPEECH Wed Sep 11 17:12:06 2013: <191>9113: *Sep 11 16:45:42.486 GMT: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore: Wed Sep 11 17:12:06 2013: <191>9114: Result=NO_MATCH(-1) After All Match Rules Attempt Wed Sep 11 17:12:06 2013: <191>9115: *Sep 11 16:45:42.486 GMT: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore: Wed Sep 11 17:12:06 2013: <191>9116: Calling Number=7942200, Called Number=, Voice-Interface=0x0, Wed Sep 11 17:12:06 2013: <191>9117: Timeout=TRUE, Peer Encap Type=ENCAP_VOIP, Peer Search Type=PEER_TYPE_VOICE, Wed Sep 11 17:12:06 2013: <191>9118: Peer Info Type=DIALPEER_INFO_SPEECH Wed Sep 11 17:12:06 2013: <191>9119: *Sep 11 16:45:42.486 GMT: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore: Wed Sep 11 17:12:06 2013: <191>9120: Wed Sep 11 17:12:06 2013: <191>9121: Result=NO_MATCH(-1) After All Match Rules Attempt Wed Sep 11 17:12:06 2013: <191>9122: *Sep 11 16:45:42.486 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore: Wed Sep 11 17:12:06 2013: <191>9123: Calling Number=, Called Number=7942200, Peer Info Type=DIALPEER_INFO_SPEECH Wed Sep 11 17:12:06 2013: <191>9124: *Sep 11 16:45:42.486 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore: Wed Sep 11 17:12:06 2013: <191>9125: Match Rule=DP_MATCH_DEST; Called Number=7942200 Wed Sep 11 17:12:06 2013: <191>9126: *Sep 11 16:45:42.486 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore: Wed Sep 11 17:12:06 2013: <191>9127: Result=Success(0) after DP_MATCH_DEST Wed Sep 11 17:12:06 2013: <191>9128: *Sep 11 16:45:42.486 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersMoreArg: Wed Sep 11 17:12:06 2013: <191>9129: Result=SUCCESS(0) Wed Sep 11 17:12:06 2013: <191>9130: List of Matched Outgoing Dial-peer(s): Wed Sep 11 17:12:06 2013: <191>9131: 1: Dial-peer Tag=1 Wed Sep 11 17:12:06 2013: <191>9132: *Sep 11 16:45:42.486 GMT: //-1/B8D312608121/DPM/dpMatchPeersCore: Wed Sep 11 17:12:06 2013: <191>9133: Wed Sep 11 17:12:06 2013: <191>9134: Calling Number=, Called Number=7942200, Peer Info Type=DIALPEER_INFO_SPEECH Wed Sep 11 17:12:06 2013: <191>9135: *Sep 11 16:45:42.486 GMT: //-1/B8D312608121/DPM/dpMatchPeersCore: Wed Sep 11 17:12:06 2013: <191>9136: Match Rule=DP_MATCH_DEST; Called Number=7942200 Wed Sep 11 17:12:06 2013: <191>9137: *Sep 11 16:45:42.486 GMT: //-1/B8D312608121/DPM/dpMatchPeersCore: Wed Sep 11 17:12:06 2013: <191>9138: Result=Success(0) after DP_MATCH_DEST Wed Sep 11 17:12:06 2013: <191>9139: *Sep 11 16:45:42.486 GMT: //-1/B8D312608121/DPM/dpMatchPeersMoreArg: Wed Sep 11 17:12:06 2013: <191>9140: Result=SUCCESS(0) Wed Sep 11 17:12:06 2013: <191>9141: List of Matched Outgoing Dial-peer(s): Wed Sep 11 17:12:06 2013: <191>9142: 1: Dial-peer Tag=1 Wed Sep 11 17:12:06 2013: <191>9143: *Sep 11 16:45:42.486 GMT: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore: Wed Sep 11 17:12:06 2013: <191>9144: Wed Sep 11 17:12:07 2013: <191>9145: Calling Number=., Called Number=, Voice-Interface=0x0, Wed Sep 11 17:12:07 2013: <191>9146: Timeout=TRUE, Peer Encap Type=ENCAP_VOIP, Peer Search Type=PEER_TYPE_VOICE, Wed Sep 11 17:12:07 2013: <191>9147: Peer Info Type=DIALPEER_INFO_SPEECH Wed Sep 11 17:12:07 2013: <191>9148: *Sep 11 16:45:42.486 GMT: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore: Wed Sep 11 17:12:07 2013: <191>9149: Result=NO_MATCH(-1) After All Match Rules Attempt Wed Sep 11 17:12:07 2013: <191>9150: *Sep 11 16:45:43.122 GMT: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore: Wed Sep 11 17:12:07 2013: <191>9151: Calling Number=., Called Number=, Voice-Interface=0x0, Wed Sep 11 17:12:07 2013: <191>9152: Timeout=TRUE, Peer Encap Type=ENCAP_VOIP, Peer Search Type=PEER_TYPE_VOICE, Wed Sep 11 17:12:07 2013: <191>9153: Peer Info Type=DIALPEER_INFO_SPEECH Wed Sep 11 17:12:07 2013: <191>9154: *Sep 11 16:45:43.122 GMT: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore: Wed Sep 11 17:12:07 2013: <191>9155: Wed Sep 11 17:12:08 2013: <191>9156: Result=NO_MATCH(-1) After All Match Rules Attempt Wed Sep 11 17:12:11 2013: <191>9157: *Sep 11 16:45:47.054 GMT: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore: Wed Sep 11 17:12:11 2013: <191>9158: Calling Number=3162471029, Called Number=7942200, Voice-Interface=0x49899704, Wed Sep 11 17:12:11 2013: <191>9159: Timeout=TRUE, Peer Encap Type=ENCAP_VOICE, Peer Search Type=PEER_TYPE_VOICE, Wed Sep 11 17:12:11 2013: <191>9160: Peer Info Type=DIALPEER_INFO_SPEECH Wed Sep 11 17:12:11 2013: <191>9161: *Sep 11 16:45:47.054 GMT: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore: Wed Sep 11 17:12:11 2013: <191>9162: Result=Success(0) after DP_MATCH_ORIGINATE; Incoming Dial-peer=1 Wed Sep 11 17:12:11 2013: <191>9163: *Sep 11 16:45:47.054 GMT: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore: Wed Sep 11 17:12:11 2013: <191>9164: Wed Sep 11 17:12:11 2013: <191>9165: Calling Number=3162471029, Called Number=7942200, Voice-Interface=0x0, Wed Sep 11 17:12:11 2013: <191>9166: Timeout=TRUE, Peer Encap Type=ENCAP_VOICE, Peer Search Type=PEER_TYPE_VOICE, Wed Sep 11 17:12:11 2013: <191>9167: Peer Info Type=DIALPEER_INFO_FAX Wed Sep 11 17:12:11 2013: <191>9168: *Sep 11 16:45:47.054 GMT: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore: Wed Sep 11 17:12:11 2013: <191>9169: Result=NO_MATCH(-1) After All Match Rules Attempt Wed Sep 11 17:12:11 2013: <191>9170: *Sep 11 16:45:47.054 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore: Wed Sep 11 17:12:11 2013: <191>9171: Calling Number=, Called Number=7942200, Peer Info Type=DIALPEER_INFO_SPEECH Wed Sep 11 17:12:11 2013: <191>9172: *Sep 11 16:45:47.054 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore: Wed Sep 11 17:12:11 2013: <191>9173: Match Rule=DP_MATCH_DEST; Called Number=7942200 Wed Sep 11 17:12:11 2013: <191>9174: *Sep 11 16:45:47.054 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore: Wed Sep 11 17:12:11 2013: <191>9175: Wed Sep 11 17:12:11 2013: <191>9176: Result=Success(0) after DP_MATCH_DEST Wed Sep 11 17:12:11 2013: <191>9177: *Sep 11 16:45:47.054 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchPeers: Wed Sep 11 17:12:11 2013: <191>9178: Result=SUCCESS(0) Wed Sep 11 17:12:11 2013: <191>9179: List of Matched Outgoing Dial-peer(s): Wed Sep 11 17:12:11 2013: <191>9180: 1: Dial-peer Tag=1 Wed Sep 11 17:12:11 2013: <191>9181: *Sep 11 16:45:47.062 GMT: //-1/BBC74C908122/DPM/dpMatchPeersCore: Wed Sep 11 17:12:11 2013: <191>9182: Calling Number=, Called Number=7942200, Peer Info Type=DIALPEER_INFO_SPEECH Wed Sep 11 17:12:11 2013: <191>9183: *Sep 11 16:45:47.062 GMT: //-1/BBC74C908122/DPM/dpMatchPeersCore: Wed Sep 11 17:12:11 2013: <191>9184: Match Rule=DP_MATCH_DEST; Called Number=7942200 Wed Sep 11 17:12:11 2013: <191>9185: *Sep 11 16:45:47.062 GMT: //-1/BBC74C908122/DPM/dpMatchPeersCore: Wed Sep 11 17:12:11 2013: <191>9186: Result=Success(0) after DP_MATCH_DEST Wed Sep 11 17:12:11 2013: <191>9187: *Sep 11 16:45:47.062 GMT: //-1/BBC74C908122/DPM/dpMatchPeersMoreArg: Wed Sep 11 17:12:11 2013: <191>9188: Result=SUCCESS(0) Wed Sep 11 17:12:11 2013: <191>9189: Wed Sep 11 17:12:11 2013: <191>9190: List of Matched Outgoing Dial-peer(s): Wed Sep 11 17:12:11 2013: <191>9191: 1: Dial-peer Tag=1 Wed Sep 11 17:12:11 2013: <191>9192: *Sep 11 16:45:47.062 GMT: //-1/BBC74C908122/DPM/dpMatchPeersCore: Wed Sep 11 17:12:11 2013: <191>9193: Calling Number=, Called Number=7942200, Peer Info Type=DIALPEER_INFO_SPEECH Wed Sep 11 17:12:11 2013: <191>9194: *Sep 11 16:45:47.062 GMT: //-1/BBC74C908122/DPM/dpMatchPeersCore: Wed Sep 11 17:12:11 2013: <191>9195: Match Rule=DP_MATCH_DEST; Called Number=7942200 Wed Sep 11 17:12:11 2013: <191>9196: *Sep 11 16:45:47.062 GMT: //-1/BBC74C908122/DPM/dpMatchPeersCore: Wed Sep 11 17:12:11 2013: <191>9197: Result=Success(0) after DP_MATCH_DEST Wed Sep 11 17:12:11 2013: <191>9198: *Sep 11 16:45:47.062 GMT: //-1/BBC74C908122/DPM/dpMatchPeersMoreArg: Wed Sep 11 17:12:11 2013: <191>9199: Result=SUCCESS(0) Wed Sep 11 17:12:11 2013: <191>9200: List of Matched Outgoing Dial-peer(s): Wed Sep 11 17:12:11 2013: <191>9201: 1: Dial-peer Tag=1 Wed Sep 11 17:12:11 2013: <191>9202: *Sep 11 16:45:47.062 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore: Wed Sep 11 17:12:11 2013: <191>9203: Wed Sep 11 17:12:11 2013: <191>9204: Calling Number=7942200, Called Number=7942200, Peer Info Type=DIALPEER_INFO_SPEECH Wed Sep 11 17:12:11 2013: <191>9205: *Sep 11 16:45:47.062 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore: Wed Sep 11 17:12:11 2013: <191>9206: Match Rule=DP_MATCH_DEST; Called Number=7942200 Wed Sep 11 17:12:11 2013: <191>9207: *Sep 11 16:45:47.062 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore: Wed Sep 11 17:12:11 2013: <191>9208: Result=Success(0) after DP_MATCH_DEST Wed Sep 11 17:12:11 2013: <191>9209: *Sep 11 16:45:47.062 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersMoreArg: Wed Sep 11 17:12:11 2013: <191>9210: Result=SUCCESS(0) Wed Sep 11 17:12:11 2013: <191>9211: List of Matched Outgoing Dial-peer(s): Wed Sep 11 17:12:11 2013: <191>9212: 1: Dial-peer Tag=1 Wed Sep 11 17:12:11 2013: <191>9213: *Sep 11 16:45:47.062 GMT: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore: Wed Sep 11 17:12:11 2013: <191>9214: Wed Sep 11 17:12:11 2013: <191>9215: Calling Number=7942200, Called Number=, Voice-Interface=0x0, Wed Sep 11 17:12:11 2013: <191>9216: Timeout=TRUE, Peer Encap Type=ENCAP_VOIP, Peer Search Type=PEER_TYPE_VOICE, Wed Sep 11 17:12:11 2013: <191>9217: Peer Info Type=DIALPEER_INFO_SPEECH Wed Sep 11 17:12:11 2013: <191>9218: *Sep 11 16:45:47.062 GMT: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore: Wed Sep 11 17:12:11 2013: <191>9219: Result=NO_MATCH(-1) After All Match Rules Attempt Wed Sep 11 17:12:11 2013: <191>9220: *Sep 11 16:45:47.062 GMT: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore: Wed Sep 11 17:12:11 2013: <191>9221: Calling Number=7942200, Called Number=, Voice-Interface=0x0, Wed Sep 11 17:12:11 2013: <191>9222: Timeout=TRUE, Peer Encap Type=ENCAP_VOIP, Peer Search Type=PEER_TYPE_VOICE, Wed Sep 11 17:12:11 2013: <191>9223: Peer Info Type=DIALPEER_INFO_SPEECH Wed Sep 11 17:12:11 2013: <191>9224: *Sep 11 16:45:47.062 GMT: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore: Wed Sep 11 17:12:11 2013: <191>9225: Wed Sep 11 17:12:11 2013: <191>9226: Result=NO_MATCH(-1) After All Match Rules Attempt Wed Sep 11 17:12:11 2013: <191>9227: *Sep 11 16:45:47.062 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore: Wed Sep 11 17:12:11 2013: <191>9228: Calling Number=, Called Number=7942200, Peer Info Type=DIALPEER_INFO_SPEECH Wed Sep 11 17:12:11 2013: <191>9229: *Sep 11 16:45:47.062 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore: Wed Sep 11 17:12:11 2013: <191>9230: Match Rule=DP_MATCH_DEST; Called Number=7942200 Wed Sep 11 17:12:11 2013: <191>9231: *Sep 11 16:45:47.062 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore: Wed Sep 11 17:12:11 2013: <191>9232: Result=Success(0) after DP_MATCH_DEST Wed Sep 11 17:12:11 2013: <191>9233: *Sep 11 16:45:47.062 GMT: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersMoreArg: Wed Sep 11 17:12:11 2013: <191>9234: Result=SUCCESS(0) Wed Sep 11 17:12:11 2013: <191>9235: List of Matched Outgoing Dial-peer(s): Wed Sep 11 17:12:11 2013: <191>9236: 1: Dial-peer Tag=1 Wed Sep 11 17:12:11 2013: <191>9237: *Sep 11 16:45:47.062 GMT: //-1/BBC74C908122/DPM/dpMatchPeersCore: Wed Sep 11 17:12:11 2013: <191>9238: Wed Sep 11 17:12:11 2013: <191>9239: Calling Number=, Called Number=7942200, Peer Info Type=DIALPEER_INFO_SPEECH Wed Sep 11 17:12:11 2013: <191>9240: *Sep 11 16:45:47.062 GMT: //-1/BBC74C908122/DPM/dpMatchPeersCore: Wed Sep 11 17:12:11 2013: <191>9241: Match Rule=DP_MATCH_DEST; Called Number=7942200 Wed Sep 11 17:12:11 2013: <191>9242: *Sep 11 16:45:47.062 GMT: //-1/BBC74C908122/DPM/dpMatchPeersCore: Wed Sep 11 17:12:11 2013: <191>9243: Result=Success(0) after DP_MATCH_DEST Wed Sep 11 17:12:11 2013: <191>9244: *Sep 11 16:45:47.062 GMT: //-1/BBC74C908122/DPM/dpMatchPeersMoreArg: Wed Sep 11 17:12:11 2013: <191>9245: Result=SUCCESS(0) Wed Sep 11 17:12:11 2013: <191>9246: List of Matched Outgoing Dial-peer(s): Wed Sep 11 17:12:11 2013: <191>9247: 1: Dial-peer Tag=1 Wed Sep 11 17:12:11 2013: <190>9248: *Sep 11 16:45:47.066 GMT: %CALL_CONTROL-6-NUMBERING_TYPE_NO_MATCH: The called number numbering type did not matchThe event for the callid 1 is being discarded.

You still have no matching dial peer: Wed Sep 11 17:12:06 2013: <191>9121: Result=NO_MATCH(-1) After All Match Rules Attempt

Send output ‘show voice dialpeer summary’

asterisk#show dial-peer voice summary dial-peer hunt 0 AD PRE PASS OUT TAG TYPE MIN OPER PREFIX DEST-PATTERN FER THRU SESS-TARGET STAT PORT 1 pots up up . 0 down 0/1/0:23 2 voip up up 316794.... 0 syst ipv4:10.1.10.7:5060 asterisk#

After setting up the live router to log the “debug voice dialpeer inout”. I can now see it’s matching on a different dial-peer; from the one I assume it was using.

dial-peer voice 9001 pots preference 1 destination-pattern 9[2-9]...... port 0/1/0:23 forward-digits 7 prefix 316

So I think I’ll try this next time, on my asterisk/Cisco setup.

dial-peer voice 1 pots numbering-type unknown destination-pattern [2-9]...... direct-inward-dial port 0/1/0:23 forward-digits 7 prefix 316

I was able to get your configuration for freepbx to make an outgoing call. I still can’t get incoming calls.

I compared the syslog of the CUCM and the asterisk, it all matched up except for outgoing calls matched 2 and 9001 on the CUCM it only matched 2. That is because the CUCM adds a 9 before the number. Other than that it changes at this…

%CALL_CONTROL-6-NUMBERING_TYPE_NO_MATCH: The called number numbering type did not matchThe event for the callid 2 is being discarded.

Here are the dial-peers I used.

dial-peer voice 1 pots
numbering-type unknown
incoming called-number .
direct-inward-dial
port 0/1/0:23
forward-digits all
!
dial-peer voice 2 voip
numbering-type unknown
destination-pattern ^794…$
session protocol sipv2
session target ipv4:10.1.10.7:5060
session transport udp
dtmf-relay rtp-nte
codec g711ulaw
!
dial-peer voice 9001 pots
numbering-type unknown
preference 1
destination-pattern [2-9]…
port 0/1/0:23
forward-digits 7
prefix 316

I turned on “debug isdn q931”, “debug voip ccapi all”, “debug voip dialpeer all”, and “debug ccsip all”. Hopeful that will give me some more info about the problem.

I also removed the “numbering-type unknown” from the dial-peers.

That caused the router to lockup.

Next time I will only do…
debug ccsip calls
debug ccsip events
debug ccsip info
debug ccsip messages
debug ccsip states
debug voip ccapi inout
debug voip ccapi detail
debug isdn q931

Before it locked up is showed a SIP request going to the FreePBX.

Wed Sep 18 17:13:11 2013: <191>14182: SIP/2.0 180 Ringing

Wed Sep 18 17:13:11 2013: <191>14183: Via: SIP/2.0/UDP 10.1.10.252:5060;branch=z9hG4bK849897;received=10.1.10.252

Wed Sep 18 17:13:11 2013: <191>14184: From: sip:[email protected];tag=7197F2B8-19BA

Wed Sep 18 17:13:11 2013: <191>14185: To: sip:[email protected];tag=as55c00a57

Wed Sep 18 17:13:11 2013: <191>14186: Call-ID: [email protected]

Wed Sep 18 17:13:11 2013: <191>14187: CSeq: 101 INVITE

Wed Sep 18 17:13:11 2013: <191>14188: Server: FPBX-2.11.0(11.4.0)

Wed Sep 18 17:13:11 2013: <191>14189: Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH

Wed Sep 18 17:13:11 2013: <191>14190: Supported: replaces, timer

Wed Sep 18 17:13:11 2013: <191>14191: Session-Expires: 1800;refresher=uas

Wed Sep 18 17:13:11 2013: <191>14192: Contact: sip:[email protected]:5060

Wed Sep 18 17:13:11 2013: <191>14193: Content-Length: 0

Wed Sep 18 17:13:11 2013: <191>14194:

Wed Sep 18 17:13:11 2013: <191>14195:
Wed Sep 18 17:13:11 2013: <191>14196: *Sep 18 16:38:20.876 GMT: //52282/DAB1B0C18150/SIP/Info/sipSPICheckResponse: INVITE response with no RSEQ - disable IS_REL1XX
Wed Sep 18 17:13:11 2013: <191>14197: *Sep 18 16:38:20.876 GMT: //-1/xxxxxxxxxxxx/SIP/Info/sipSPIGetContentGTD: No GTD found in inbound container
Wed Sep 18 17:13:11 2013: <191>14198: *Sep 18 16:38:20.876 GMT: //-1/xxxxxxxxxxxx/SIP/Info/sipSPIGetContentSDP: No SDP found in inbound container
Wed Sep 18 17:13:11 2013: <191>14199: *Sep 18 16:38:20.876 GMT: //52282/DAB1B0C18150/SIP/Info/ccsip_api_call_alert: SDP Body either absent or ignored in 180 RINGING:- will wait for 200 OK to do negotiation.
Wed Sep 18 17:13:11 2013: <191>14200: *Sep 18 16:38:20.876 GMT: //52282/DAB1B0C18150/SIP/Info/sipSPIProcessHistoryInfoHeader: No HI headers recvd from app container
Wed Sep 18 17:13:11 2013: <191>14201: *Sep 18 16:38:20.876 GMT: //-1/xxxxxxxxxxxx/SIP/Info/sipSPIGetContentQSIG: No QSIG Body found in inbound container

Frankly I have no idea what is going on. It looks like your SIP isn’t negotiating a CODEC or transport and your ISDN D channel is down.

Hi, I had some similar issues and thought the OP might like to see my configs now that I think I have it working…

dial-peer voice 20 pots destination-pattern .T incoming called-number . direct-inward-dial port 0/1/0:15 forward-digits all ! dial-peer voice 300 voip destination-pattern 558455.. session protocol sipv2 session target ipv4:10.13.4.13:5060 session transport udp incoming called-number 558455.. dtmf-relay rtp-nte codec g711ulaw

I now need to get my Inbound Route to work. I get an RVA telling me “Your call cannot be completed as dialled” however the logs aren’t very descriptive as to why;

[2013-09-20 02:21:23] VERBOSE[1556][C-00000016] netsock2.c: == Using SIP RTP TOS bits 184 [2013-09-20 02:21:23] VERBOSE[1556][C-00000016] netsock2.c: == Using SIP RTP CoS mark 5 [2013-09-20 02:21:23] VERBOSE[4238][C-00000016] pbx.c: -- Executing [55845555@from-internal:1] ResetCDR("SIP/csco2811pri-00000025", "") in new stack [2013-09-20 02:21:23] VERBOSE[4238][C-00000016] pbx.c: -- Executing [55845555@from-internal:2] NoCDR("SIP/csco2811pri-00000025", "") in new stack [2013-09-20 02:21:23] VERBOSE[4238][C-00000016] pbx.c: -- Executing [55845555@from-internal:3] Progress("SIP/csco2811pri-00000025", "") in new stack [2013-09-20 02:21:23] VERBOSE[4238][C-00000016] pbx.c: -- Executing [55845555@from-internal:4] Wait("SIP/csco2811pri-00000025", "1") in new stack [2013-09-20 02:21:24] VERBOSE[4238][C-00000016] pbx.c: -- Executing [55845555@from-internal:5] Progress("SIP/csco2811pri-00000025", "") in new stack [2013-09-20 02:21:24] VERBOSE[4238][C-00000016] pbx.c: -- Executing [55845555@from-internal:6] Playback("SIP/csco2811pri-00000025", "silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer") in new stack [2013-09-20 02:21:24] VERBOSE[4238][C-00000016] file.c: -- Playing 'silence/1.ulaw' (language 'en') [2013-09-20 02:21:25] VERBOSE[4238][C-00000016] file.c: -- Playing 'cannot-complete-as-dialed.gsm' (language 'en') [2013-09-20 02:21:27] VERBOSE[4238][C-00000016] file.c: -- Playing 'check-number-dial-again.gsm' (language 'en') [2013-09-20 02:21:28] VERBOSE[4238][C-00000016] pbx.c: == Spawn extension (from-internal, 55845555, 6) exited non-zero on 'SIP/csco2811pri-00000025' [2013-09-20 02:21:28] VERBOSE[4238][C-00000016] pbx.c: -- Executing [h@from-internal:1] Hangup("SIP/csco2811pri-00000025", "") in new stack [2013-09-20 02:21:28] VERBOSE[4238][C-00000016] pbx.c: == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/csco2811pri-00000025'

My Inbound route is set with no DID/CID to match, so I’d assume an ‘Any DID / Any CID’ should match all incoming - and I have the inbound route’s destination set to an auto-attendant IVR. Perhaps it has something to do with the context ‘from-internal’.

I used the Asterisk trunk config from ev0ldave’s post - http://www.freepbx.org/forum/freepbx/tips-and-tricks/basic-setup-from-freepbx-to-cisco-28xx-as-voicegateway-with-pri

Context needs to be from-trunk to hit the inbound routes. Right now you are sending call to internal dial plan.

Thanks Skyking -> from-trunk was a win… I appreciate the quick response.

Should I be using “from-trunk” or “form-pstn” in my trunk setup for the cisco 2821? It’s set to “from-pstn” now. I was waiting it to also is the inbound routes, and the “any DID / any CID”.

After by reboot form last night my config was missing a few changes I made, so hopefully to night I will get a good test.