Cisco router IOS to Asterisk


#1

Hello all, I have searched the forums looking for an answer , but not one on having a router with dial-peers connect to an Asterisk box with FXO’s for dial out and in. My routers have FXS cards, but I was thinking of linking them to an Asterisk box. All the topics I have found is either using Call manager or Cisco phones, not routers.

Thanks.

Mike


#2

Hi,

I have the same question…i want to connect my 2620 to the asterick server vai a FXO port…but not to sure of the card required for the PC/asterick box…
It this what you are trying to do
Thanks

Duncan


#3

I’m trying to do H.323 between the Cisco and the Asterisk server— so that I can use the PRI card to dial in and out…

What you’re doing-- are you wanting to connect the FXO/FXS ports to the PSTN and route calls back and forth to Asterisk?

That’s what I’d do-- using H.323 or MGCP

Here’s some info on FXS and FXO
(Foreign eXchange Station) The interface provided by the telephone company to its
customers, which includes dial tone, power and ring voltage. The telephone jack
on the wall is an FXS interface. The plug on a telephone is a Foreign Exchange Office
(FXO) interface, which provides on-hook/off-hook loop closure to the telephone company.
Thus, an FXO phone plugs into an FXS jack.

A PBX’s FXO interface is connected to the FXS interface, and all phones (FXO) connect
to the FXS interface on the PBX.

FXS= Foreign eXtension, Station
FXO - Foreign eXtension, Office

Put simply:
If you have 2 analog phone lines (“1FB” or “1B” are typical names for a standard analog
business line) from the phone company, they go into the FXO ports. This type of
card connects lines that provide dialtone FROM the telco TO you. If you have a
device you need to provide dialtone TO, you connect that to an FXS port
(fax, modem, analog phone).

This link provides a good visual:

http://www.qtelnet.com/telephony-index3.htm#Q0

Hope that helps…


#4

I’m using * with a 1761 and FXO card. Here are the relavent parts of my config:


! You can add more codecs to the following, this chooses codec
! preference order. It’s not strictly required, but I figured people
! would like to know how to do it.
!
voice class codec 1
codec preference 1 g711ulaw
!
!
! The following is my FXO port. Replace XXXXXXXXXX with the extension
! You would like dialed on the asterisk system when this FXO port rings.
!
voice-port 0/0
connection plar opx XXXXXXXXXX
caller-id enable
!
! This sends any number dialed from * to this port and send the
! DTMF digits to the network
!
dial-peer voice 1 pots
destination-pattern .T
port 0/0
!
! This is the dial peer pointing back to asterisk
! Note that XXXXXXXXXX needs to be the same number you put in above
! Basically the plar statement dials the XXX number whenever it gets a
! ring. The nifty part is the opx, which says don’t answer the FXO until
! the sip call leg answers.
!
dial-peer voice 6027 voip
destination-pattern XXXXXXXXXX
session protocol sipv2
session target ipv4:10.0.1.25
codec g711ulaw
no vad
!


That’s it!


#5

Oh, by the way, here’s the mathcing entry from sip.conf:

Replace the x.y.z.a with the IP address of the IOS GW.

[pots]
type=friend
host=x.y.z.a
context=from-sip
insecure=very
qualify=2000


#6

“[pots]
type=friend
host=x.y.z.a
context=from-sip
insecure=very
qualify=2000”

So would that work with an h.323 router?

I’ve got the below code in my Asterisk box, but mine’s not a SIP trunk.

I’ve installed asteriskathome-h323-1.0.zip
but I don’t know exactly how to configure that to allow incoming H.323 calls to be routed to extensions…

dial-peer voice 635099 voip
description calls sent to Asterisk
preference 1
destination-pattern [635-9]…
progress_ind setup enable 3
voice-class codec 1
voice-class h323 1
session target ipv4:10.10.1.28
dtmf-relay h245-alphanumeric
no vad