Trouble with DAHDI and Analog lines


#1

Hello all

I’m running Asterisk 1.8-r334953, on Ubuntu 11.04, with a Digium AEX800 pci-e card. There are 4 analog lines coming into the building (someday I will upgrade). Inside we are using Cisco SPA502G phones. I’m using two phones to test.

Inside, the phones can call to other phones and answer calls from other phones inside the building. I am unable to call outside the building or receive calls into the building. The main reference I have been using is Asterisk: the definitive guide, along with google and the forums. I’m hoping the problem lies in my dialplan and I am simply overlooking something.

Here is my sip.conf

;
;sip.conf
;
[general]
context=unauthenticated
allowguest=no	
srvlookup=yes		
udpbindaddr=0.0.0.0	
tcpenable=no		

[office-phone](!)	
type=friend
context=LocalSets
host=dynamic
nat=yes
secret=xxxxxxx
dtmfmode=auto
disallow=all
allow=ulaw
allow=alaw

[user0](office-phone)
[user1](office-phone)

and the extensions.conf

;
;extensions.conf
;
[globals]
LOCAL=DAHDI/G0

[LocalSets]
include => external 

;normal extensions
exten => 1000,1,Dial(SIP/user0)

exten => 1001,1,Dial(SIP/user1)

exten => 2000,1,Answer()
	same => n,Playback(hello-world)
	same => n,Hangup()

[incoming]
exten => s,1,Answer()
	same => n,Playback(hello-world)
	same => n,Dial(SIP/1000)
	same => n,Hangup()

[external]
exten => _XXXXXXXXXXX,1,Dial(${LOCAL}/${EXTEN}) 
exten => _NXXNXXXXXX,1,Dial(${LOCAL}/${EXTEN})	
exten => _NXXXXXX,1,Dial(${LOCAL}/${EXTEN})	

I see the following when I call a number outside the building. Calls coming into the building seem to be ignored completely.
== Using SIP RTP CoS mark 5
– Executing [xxxxxxxxxx@LocalSets:1] Dial(“SIP/user0-00000004”, “DAHDI/G0/xxxxxxxxxx”) in new stack
== Everyone is busy/congested at this time (1:0/0/1)
– Auto fallthrough, channel ‘SIP/user0-00000004’ status is ‘CHANUNAVAIL’

“dahdi show status” returns
Description Alarms IRQ bpviol CRC Fra Codi Options LBO
Wildcard AEX800 OK 0 0 0 CAS Unk 0 db (CSU)/0-133 feet (DSX-1)

“dahdi show channels” returns
Chan Extension Context Language MOH Interpret Blocked State
pseudo default default In Service
1 default default In Service
2 default default In Service
3 default default In Service
4 default default In Service
5 default default In Service
6 default default In Service
7 default default In Service
8 default default In Service
Please note, today is the first time I have seen the 8 channels and pseudo listed. Usually I only see (I hope this means I am getting close):
Chan Extension Context Language MOH Interpret Blocked State

“/etc/init.d/dahdi status” outside the cli returns:

Span 1: WCTDM/0 “Wildcard AEX800” (MASTER)

1 FXO FXSKS (In use) (EC: VPMADT032 - INACTIVE) RED
2 FXO FXSKS (In use) (EC: VPMADT032 - INACTIVE) RED
3 FXO FXSKS (In use) (EC: VPMADT032 - INACTIVE)
4 FXO FXSKS (In use) (EC: VPMADT032 - INACTIVE) RED
5 FXO FXSKS (In use) (EC: VPMADT032 - INACTIVE) RED
6 FXO FXSKS (In use) (EC: VPMADT032 - INACTIVE) RED
7 FXO FXSKS (In use) (EC: VPMADT032 - INACTIVE) RED
8 FXO FXSKS (In use) (EC: VPMADT032 - INACTIVE) RED

Port 3 is where I have an analog line plugged into the card. The others are still attached to the old system.
So, my questions are: Why can I not call outside or inside via the analog line, and what significance does the “g0” have after dahdi/g0 (length to the box?)?

I’m still learning a great deal about phone systems. If anyone has any good resources other than the forums, wiki, and the voip website I would be glade to have them. Thank you


#2

How looks your chan_dahdi.conf, if you only have one line set your dial parameters to DAHDI/3/.


#3

I replaced DAHDI/G0 with DAHDI/G3 and did a dialplan reload, no change.

chan_dahdi.conf

;
;chan_dahdi.conf
;
[channels]
signalling = fxs_ks
channel => 1-8

dahdi/system.conf

#
# DAHDI Configuration File
#
loadzone=us
defaultzone=us
fxsks=1-8 

#4

Its dahdi/3 not dahdi/g3.

When you use gX or GX you are sayimg use the group of channels X (x is a number). But you dont defined a group in your chan_dahdi.conf, thats why i suggested use dahdi/3 this use directly the channel 3. where you have the line connected.


#5

Excellent, using the “3” instead of “G3” works. Of course, you already knew that. Thank you for explaining that to me.

That leaves me with one more question. What do I need to answer incoming calls?

[incoming]
exten => s,1,Answer()
same => n,Playback(hello-world)
same => n,Hangup()

This doesn’t seem to cut it. I get a busy signal from an ouside line calling in.


#6

context=incoming to appear in the right place.


#7

Thanks for your help guy’s. This portion of the Asterisk is now working for me. kudos all around :smiley: