Looking for help with dahdi config and FXO trunks

Have been researching the proper configuration for a few days now with no luck. I can’t get calls to go through a TDM410P card connected to a POTS line. Just trying to get channel 1 to send the call through. I get the same error from asterisk “The number you have dialed is not in service”. It could be that dahdi is not set properly or possibly the trunks or routes. I have tried multiple combinations. Any suggestions would be greatly appreciated.

I have installed the latest FReePBX distro and Asterisk 1.8.10.0 is running. I have two Polycom IP 450 phones connected and configured. The phones can call each other fine. Just can’t call out.

When i run dadhi_tool and dahdi_scan everything looks fine, no errors.

error of call coming in:

[2012-04-15 08:34:41] DEBUG[9706] chan_dahdi.c: CallerID number: 508XXX817, name: WIRELESS CALLER, flags=0
[2012-04-15 08:34:41] VERBOSE[9706] pbx.c: – Executing [[email protected]:1] NoOp(“DAHDI/1-1”, “No DID or CID Match”) in new stack
[2012-04-15 08:34:41] VERBOSE[9706] pbx.c: – Executing [[email protected]:2] Answer(“DAHDI/1-1”, “”) in new stack
[2012-04-15 08:34:41] VERBOSE[9706] pbx.c: – Executing [[email protected]:3] Wait(“DAHDI/1-1”, “2”) in new stack
[2012-04-15 08:34:44] VERBOSE[9706] pbx.c: – Executing [[email protected]:4] Playback(“DAHDI/1-1”, “ss-noservice”) in new stack
[2012-04-15 08:34:44] VERBOSE[9706] file.c: – <DAHDI/1-1> Playing ‘ss-noservice.ulaw’ (language ‘en’)
[2012-04-15 08:34:49] VERBOSE[9706] pbx.c: – Executing [[email protected]:5] SayAlpha(“DAHDI/1-1”, “”) in new stack
[2012-04-15 08:34:49] VERBOSE[9706] pbx.c: – Executing [[email protected]:6] Hangup(“DAHDI/1-1”, “”) in new stack
[2012-04-15 08:34:49] VERBOSE[9706] pbx.c: == Spawn extension (from-pstn, s, 6) exited non-zero on ‘DAHDI/1-1’
[2012-04-15 08:34:49] VERBOSE[9706] pbx.c: – Executing [[email protected]:1] Macro(“DAHDI/1-1”, “hangupcall,”) in new stack
[2012-04-15 08:34:49] VERBOSE[9706] pbx.c: – Executing [[email protected]:1] GotoIf(“DAHDI/1-1”, “1?theend”) in new stack
[2012-04-15 08:34:49] VERBOSE[9706] pbx.c: – Goto (macro-hangupcall,s,3)
[2012-04-15 08:34:49] VERBOSE[9706] pbx.c: – Executing [[email protected]:3] Hangup(“DAHDI/1-1”, “”) in new stack
[2012-04-15 08:34:49] VERBOSE[9706] app_macro.c: == Spawn extension (macro-hangupcall, s, 3) exited non-zero on ‘DAHDI/1-1’ in macro ‘hangupcall’
[2012-04-15 08:34:49] VERBOSE[9706] pbx.c: == Spawn extension (from-pstn, h, 1) exited non-zero on ‘DAHDI/1-1’
[2012-04-15 08:34:49] VERBOSE[9706] sig_analog.c: – Hanging up on ‘DAHDI/1-1’
[2012-04-15 08:34:49] VERBOSE[9706] chan_dahdi.c: – Hungup ‘DAHDI/1-1’

chan_dahdi.conf


;
; Zapata telephony interface
;
; Configuration file

[trunkgroups]

[channels]

language=en
context=from-zaptel
signalling=fxs_ks
rxwink=300 ; Atlas seems to use long (250ms) winks
;
; Whether or not to do distinctive ring detection on FXO lines
;
;usedistinctiveringdetection=yes
busydetect=yes
busycount=10
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=800
rxgain=0.0
txgain=0.0
group=0
callgroup=1
pickupgroup=1
immediate=no

;faxdetect=both
faxdetect=incoming
;faxdetect=outgoing
;faxdetect=no

#include dahdi-channels.conf

group=1

;Include AMP configs
#include chan_dahdi_additional.conf
#include chan_dahdi_custom.conf

#include chan_dahdi_trunk.conf


chan_dahdi_trunk.conf

; This file was created by Webmin’s Dahdi HW Config module
; Only E1/T1/BRI and FXO ports are configured as trunks,
; FXS ports will not appear here and are configured in chan_dahdi_additional.conf by FreePBX

; Span 1 - FXO Port with fxs_ks signalling, Channel = 1
signalling=fxs_ks
callerid=asreceived
group=1
context=from-pstn
channel => 1
context=default

; Span 1 - FXO Port with fxs_ks signalling, Channel = 2
signalling=fxs_ks
callerid=asreceived
group=1
context=from-pstn
channel => 2
context=default

; Span 1 - FXO Port with fxs_ks signalling, Channel = 3
signalling=fxs_ks
callerid=asreceived
group=1
context=from-pstn
channel => 3
context=default

; Span 1 - FXO Port with fxs_ks signalling, Channel = 4
signalling=fxs_ks
callerid=asreceived
group=1
context=from-pstn
channel => 4
context=default


chan_dahdi_groups.conf

;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make ;
; custom modifications, details at: http://freepbx.org/configuration_files ;
;--------------------------------------------------------------------------------;
;

signalling=fxs_ks
context=from-dahdi
callerid=asreceived
group=0
channel=>1

signalling=fxs_ks
context=from-dahdi
callerid=asreceived
group=0
channel=>2

signalling=fxs_ks
context=from-dahdi
callerid=asreceived
group=0
channel=>3

signalling=fxs_ks
context=from-dahdi
callerid=asreceived
group=0
channel=>4


sytem.conf

This file was created by Webmin’s Dahdi HW Config module

Span 1

fxsks=1
echocanceller=mg2,1
fxsks=2
echocanceller=mg2,2
fxsks=3
echocanceller=mg2,3
fxsks=4
echocanceller=mg2,4

Global data

loadzone = us
defaultzone = us


You need an inbound route. Just leave DID and CID blank.

Sometimes just having an extra set of eyes goes a long way. Such a simple thing, yet was driving me crazy for days. I removed the DID from the incoming route and the call went through…

Thanks a bunch…
CTG