Call Manager + Asterisk + Router Cisco with FXO

Hi everybody!

Im new in this world of ip telephony, consequently, am new in asterisk too, my english sucks so forgive me about this :neutral_face:

I’ll try to be brief and specific

I have set up a sip trunk between Asterisk and Cisco CallManager and it worked. I can make calls from asterisk Extensions to callmanager extensions seamlessly and vice versa. But i can’t make calls from asterisk to PSTN using a cisco router as my gateway

this is what I did to make it work:

to setup the trunk for the ccm side a follow these steps in this link. voip-info.org/wiki/view/Aste … ntegration

and this is what i did to make it work the trunk of the asterisk side (surely everyone knows how to do it but I want to be very specific about what I did in case I missed something)

I put this in sip.conf

[general]
port = 5060
bindaddr = 0.0.0.0
context = others

[8000]
type=friend
context=lan-phones
secret=1234
host=dynamic

[8001]
type=friend
context=lan-phones
secret=1234
host=dynamic

[8002]
type=friend
context=lan-phones
secret=1234
host=dynamic

[callman01]
type=friend
context=lan-phones
host=10.128.8.100
disallow=all
allow=ulaw
allow=alaw
nat=no
canreinvite=yes
qualify=yes

[gwvoz]
allow=ulaw
canreinvite=no
context=lan-phones
disallow=all
dtmfmode=rfc2833
host=10.128.8.108
type=friend
insecure=very
qualify=yes

+++++++++++++++++++++++++++

and i put this in extension.conf

[others]

[lan-phones]

exten => 8000,1,Dial(SIP/8000,20)
exten => 8000,2,VoiceMail(8000,u)

exten => 8001,1,Dial(SIP/8001,20)
exten => 8001,2,VoiceMail(8001,u)

exten => 8002,1,Dial(SIP/8002,20)
exten => 8002,2,VoiceMail(8002,u)

exten => 2999,1,VoiceMailMain(${CALLERID(num)},s)

include=outgoing
include=outgoing-to-copaco

[macro-dialout-callmanager]
exten => s,1,ChanIsAvail(SIP/callman01)
exten => s,2,Set(AVAILCHAN=${CUT(AVAILCHAN,1)})
exten => s,3,Dial(${AVAILCHAN}/${ARG1})
exten => s,4,Hangup

exten => s,102,Congestion

[outgoing]

exten => _XXXX,1,Macro(dialout-callmanager,${EXTEN})
exten => _7XXXXXX,1,Macro(dialout-callmanager,${EXTEN})
exten => _7NXXXXXX,1,Macro(dialout-callmanager,${EXTEN})
exten => _71NXXNXXXXXX,1,Macro(dialout-callmanager,${EXTEN})

exten => i,1,Congestion

[macro-dialout-gwvoz]
exten => s,1,ChanIsAvail(SIP/gwvoz)
exten => s,2,Set(AVAILCHAN=${CUT(AVAILCHAN,1)})
exten => s,3,Dial(${AVAILCHAN}/${ARG1})
exten => s,4,Hangup

exten => s,102,Congestion

[outgoing-to-copaco]

exten => _7ZXXXXX,1,Macro(dialout-gwvoz,${EXTEN})
;exten => _7[1-8]XXXXXXX,1,Macro(dialout-gwvoz,${EXTEN})
;exten => _71NXXNXXXXXX,1,Macro(dialout-gwvoz,${EXTEN})

exten => i,1,Congestion

and this is what I put in the cisco router:

dial-peer voice 10051982 voip
description Route calls starting with 8 to the Asterisk PBX
destination-pattern 8…
session protocol sipv2
session target ipv4:10.128.8.120:5060
session transport udp
dtmf-relay rtp-nte
codec g711ulaw
clid strip
no vad

dial-peer voice 8051989 pots
destination-pattern 7[1-9]T
translate-outgoing calling 2
port 2/0/10
forward-digits 6

sip-ua
retry invite 3
retry response 3
retry bye 3
retry cancel 3
timers trying 1000
sip-server ipv4:10.128.8.120

voice-port 2/0/10
supervisory disconnect dualtone mid-call
input gain 10
cptone AR
timeouts call-disconnect 1
timeouts wait-release 1
timing hookflash-out 50
connection plar 8000
impedance complex2
description COPACO-495211
caller-id enable

sincerely i get to that point without understanding much of what I did. I did after trying and trying each configuration as found on the web.

could someone guide me into the light?

Total Thanks…

Hugo