Hi,
I am new to Asterisk and learning fast. I was wondering if there is a way to interface Asterisk with a Cisco 2800 series router. My boss would like to use the cisco router with its FXO ports to receive the incoming calls and forward them to Asterisk and vice versa for outgoing calls. Is this possible?
Thanks,
Matt
[quote=“hatfieldm”]Hi,
I am new to Asterisk and learning fast. I was wondering if there is a way to interface Asterisk with a Cisco 2800 series router. My boss would like to use the cisco router with its FXO ports to receive the incoming calls and forward them to Asterisk and vice versa for outgoing calls. Is this possible?
Thanks,
Matt[/quote]
I haven’t used that device so I can’t say for sure, but we use a Cisco 3662 with NM-HDV-48 cards in it to terminate several PRI circuits. Calls coming in on those PRIs are directed to our Asterisk server with no problem at all.
Thanks for the response. Any chance that you could post the section of your router config that sends the calls to asterisk?
You’ll need several pieces. There’s lots more, but this should get you started.
This tells the 2800 to send calls matching the destination pattern to the session target address. Put the IP address of your Asterisk box here. Also, put your inbound number in the destination-pattern.
dial-peer voice 9999 voip
description to asterisk
preference 1
destination-pattern 9999999999$
progress_ind setup enable 3
signaling forward none
voice-class codec 1
session protocol sipv2
session target ipv4:66.x.x.x
dtmf-relay rtp-nte
no vad
Some other things you’ll probably need.
voice service voip
signaling forward none
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711ulaw
modem passthrough nse codec g711ulaw
sip
!
!
voice class codec 1
codec preference 1 g729r8
codec preference 2 g711ulaw
!
When you send calls from Asterisk to the 2800, you’ll need a POTS dial-peer to tell the 2800 what to do with the call. In the line port 2/1:23, substitute the port of your FXO line.
dial-peer voice 2 pots
description all local to xxxxx
preference 2
destination-pattern [2-9].........$
fax rate disable
no digit-strip
direct-inward-dial
port 2/1:23
forward-digits all
!
Thanks!! That helps alot. One more question. Do you route your outgoing calls through the Cisco router as well?
Yes, that’s what the POTS dial peer is for.
Great. I appreciate the info and your time. One last question (I know I said this before, but I mean it this time) How did you configure the trunk on the asterisk box to route calls to the Cisco Router?
Put this in your sip.conf file, replacing the x.x.x.x with the address of the 2800.
; Router with the PRI card
[x.x.x.x]
context=default
type=friend
host=x.x.x.x
dtmfmode=rfc2833
allow=ulaw
;allow=g729
You’ll also want to put this in your extensions.conf file.
[outbound]
exten => _XXXXXXXXXX,1,Dial(SIP/${EXTEN:0}@x.x.x.x)
exten => _1XXXXXXXXXX,1,Dial(SIP/${EXTEN:0}@x.x.x.x)
exten => _011.,1,Dial(SIP/${EXTEN:0}@x.x.x.x)