Asterisk Cisco FXO

Hi, After spending lots of time digging bits and pieces i have finally made my setup to work. So i thought i’d share it… im sure there are things to improve or change. (still need to get caller ID to work)

Any suggestions or comments will be gladly apreciated!

FreePBX(Asterisk V1.8.11) [on ESX4]
Cisco 3745 (C3745-ADVENTERPRISEK9-M Version 12.4 - 4-FXO, 2-FXS)
Note: both devices in the same LAN

CISCO CONFIG:


voice service voip
allow-connections h323 to h323
allow-connections h323 to sip
allow-connections sip to h323
allow-connections sip to sip
supplementary-service h450.12
fax protocol pass-through g711alaw
h323
modem passthrough nse codec g711alaw
sip
header-passing

voice-port 1/0/0
input gain 10
output attenuation 10
no comfort-noise
connection plar 200
station-id number 200

voice-port 1/0/1
input gain 10
output attenuation 10
no comfort-noise
connection plar 201
station-id number 201

voice-port 1/1/0

voice-port 1/1/1

voice-port 2/0/0

voice-port 2/0/1

dial-peer voice 11 pots
description *** Outgoing calls ***
preference 1
destination-pattern 9…
port 1/0/0

dial-peer voice 10 pots
description *** Outgoing calls ***
preference 2
destination-pattern 9…
port 1/0/1

dial-peer voice 200 voip
preference 1
service session
destination-pattern 200
session protocol sipv2
session target ipv4:192.168.0.12:5060
session transport udp
dtmf-relay sip-notify rtp-nte
codec g711ulaw
no vad

dial-peer voice 201 voip
preference 2
service session
destination-pattern 201
session protocol sipv2
session target ipv4:192.168.0.12:5060
session transport udp
dtmf-relay sip-notify rtp-nte
codec g711ulaw
no vad

sip-ua
authentication username asterisk password 04541B031C25454D0614
retry invite 3
retry response 3
retry bye 3
retry cancel 3
sip-server ipv4:192.168.0.12:5060

ASTERISK CONFIG


Trunk CISCO FXO 0

host=192.168.0.3
type=friend
username=asterisk
secret=password
context=from-internal
disallow=all
allow=ulaw&alaw
nat=no
directmedia=no

Trunk CISCO FXO 1

host=192.168.0.3
type=friend
username=asterisk
secret=password
context=from-internal
disallow=all
allow=ulaw&alaw
nat=no
directmedia=no

EXTENSIONS: (key configurations only)
LINE1<200>
secret=blank
host=192.168.0.3(cisco ip)
Optional Destinations: (set to announcements)

LINE2<201>
secret=blank
host=192.168.0.3(cisco ip)
Optional Destinations: (set to announcements)

INBOUND ROUTES:
PSTN0
DID Number=200
Set Destination:
Trunks= CISCO FXO 0

PSTN1
DID Number=201
Set Destination:
Trunks= CISCO FXO 1

OUTBOUND ROUTES:
PSTN-OUT
Dial Pattern = X.
Trunk Sequence:
0 CISCO FXO 0
1 CISCO FXO 1

You don’t have callerid enabled on the voice ports on the Cisco

Hi thanks for the reply. if i enable caller id it seems to kill the station-id function and does not authenticate in asterisk, in other words i get a “fake authentication device” in the asterisk log.

Well everyone has a different twist.

I alwasy set “forward digits all” and a t.38 option like this:

voice service voip
signaling forward unconditional
caller-id enable
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback cisco
sip

The my FXO peers look like this:

voice-port 3/0
trunk-group analog

connection plar opx 2163983000

The opx # is the DID I route on

Hi, i tried changing some of the config on one of my FXO with no luck. this is what i have:

trunk group analog
!
!
!
voice service voip
allow-connections h323 to h323
allow-connections h323 to sip
allow-connections sip to h323
allow-connections sip to sip
supplementary-service h450.12
signaling forward unconditional
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback cisco
h323
modem passthrough nse codec g711alaw
sip
header-passing

voice-port 1/0/1
input gain 10
output attenuation 10
no comfort-noise
connection plar opx 5614652347
caller-id enable

dial-peer voice 201 voip
preference 2
service session
destination-pattern 5614652347
session protocol sipv2
session target ipv4:192.168.0.12:5060
session transport udp
dtmf-relay sip-notify rtp-nte
codec g711ulaw
no vad

this is what i see in the asterisk side:

[2012-11-08 16:24:45] NOTICE[4049] chan_sip.c: Sending fake auth rejection for device “Cell Phone FL” sip:[email protected];tag=DA98C34-786

can you post more of your config? Thanks!

[2012-11-08 16:24:45] NOTICE[4049] chan_sip.c: Sending fake auth rejection for device “Cell Phone FL” sip:[email protected];tag=DA98C34-786