[Issue] Outgoing Analog DAHDI Extension

Hi all,

whenever I try to go Off Hook on my Analog Phone I get a busy tone after a little while (2-3 seconds)

The Asterisk Log shows this:

== Starting DAHDI/2-1 at internal,s,1 failed so falling back to exten 's' == Starting DAHDI/2-1 at internal,s,1 still failed so falling back to context 'default' [Jan 6 20:29:06] WARNING[2433]: pbx.c:4358 __ast_pbx_run: Channel 'DAHDI/2-1' sent into invalid extension 's' in context 'default', but no invalid handler -- Hungup 'DAHDI/2-1'

My DAHDY-Conf:

[code] Autogenerated by /usr/sbin/dahdi_genconf on Thu Apr 15 14:23:23 2010
; If you edit this file and execute /usr/sbin/dahdi_genconf again,
; your manual changes will be LOST.
; Dahdi Channels Configurations (chan_dahdi.conf)
;
; This is not intended to be a complete chan_dahdi.conf. Rather, it is intended
; to be #include-d by /etc/chan_dahdi.conf that will include the global settings
;

; Span 1: WCTDM/4 “Wildcard TDM400P REV E/F Board 5” (MASTER)
;;; line="1 WCTDM/4/0 FXOKS (SWEC: MG2)"
signalling=fxo_ls
callerid=“FAX” <720>
mailbox=720
group=1
context=internal
channel => 1
callerid=
mailbox=
group=
context=internal

;;; line="2 WCTDM/4/1 FXOKS (SWEC: MG2)"
signalling=fxo_ls
callerid=“SKY Box” <721>
mailbox=721
group=5
context=internal
channel => 2
callerid=
mailbox=
group=
context=internal

;;; line="3 WCTDM/4/2 FXSKS (SWEC: MG2)"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 3
callerid=
group=
context=pstn
[/code]

my Extensions.conf:

[code][general]
static=yes
writeprotect=no

[default]
;include => local

[globals]
DIALTIMEOUT = 45 ;; seconds
PAGING_HEADER=intercom
INTERNAL_HEADER=internal

[internal]
exten => _70X,hint,SIP/${EXTEN}
exten => _70X,1,SIPAddHeader(Alert-Info: ${INTERNAL_HEADER})
exten => _70X,2,NoOp(SIP/mypeer ${CALLERID(num)} ext ${EXTEN})
exten => _70X,n,GotoIf($["${CALLERID(num)}" = “${EXTEN}”]?vm:vm2)
exten => _70X,n(vm),VoicemailMain(s${EXTEN})
exten => _70X,n(vm2),Dial(SIP/${EXTEN},25,Tt)
exten => _70X,n,VoiceMail(${EXTEN})
exten => _71X,hint,SIP/${EXTEN}
exten => _71X,1,SIPAddHeader(Alert-Info: ${INTERNAL_HEADER})
exten => _71X,2,NoOp(SIP/mypeer ${CALLERID(num)} ext ${EXTEN})
exten => _71X,n,GotoIf($["${CALLERID(num)}" = “${EXTEN}”]?vm:vm2)
exten => _71X,n(vm),VoicemailMain(s${EXTEN})
exten => _71X,n(vm2),Dial(SIP/${EXTEN},25,Tt)
exten => _71X,n,VoiceMail(${EXTEN})
exten => _720,1,Dial(DAHDI/1)
exten => _721,1,Dial(DAHDI/2)


[/code]

I can call the Analog Dahdi Ports 1 & 2 and answer the call but cannot make an outgoing call

I tried to add:

exten => i,1,playback(tt-weasels) to my default as recommended in some other forum post and can then hear the announcement …

== Starting DAHDI/2-1 at internal,s,1 failed so falling back to exten 's' == Starting DAHDI/2-1 at internal,s,1 still failed so falling back to context 'default' -- Sent into invalid extension 's' in context 'default' on DAHDI/2-1 -- Executing [i@default:1] Playback("DAHDI/2-1", "tt-weasels") in new stack -- <DAHDI/2-1> Playing 'tt-weasels.gsm' (language 'en') -- Auto fallthrough, channel 'DAHDI/2-1' status is 'UNKNOWN' -- Hungup 'DAHDI/2-1'

where do I go wrong …?

THX

Steff

ok … I tried Google but no luck …

Content of chan_dahdi.conf:

[trunkgroups]

[channels]
loadzone=uk
defaultzone=uk
usecallerid=yes
ukcallerid=yes
cidsignalling=v23 ; Added for UK CLI detection
cidstart=polarity ; Added for UK CLI detection
sendcalleridafter=1
callerid=asreceived ; propagate the CID received from BT.

context=from-pstn
signalling=fxs_ks
rxwink=300              ; Atlas seems to use long (250ms) winks
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
faxdetect=incoming
;echotraining=800
rxgain=0.0
txgain=0.0
callgroup=1
pickupgroup=1

;Uncomment these lines if you have problems with the disconection of your analog lines
;busydetect=yes
;busycount=3

immediate=yes
;usecallerid=yes
;callwaiting=yes
;usecallingpres=yes
;callwaitingcallerid=yes
;threewaycalling=yes
;transfer=yes
;canpark=yes
;cancallforward=yes
;callreturn=yes
;echocancel=yes
;echocancelwhenbridged=no
;echotraining=yes

;group=1
;callgroup=1
;pickupgroup=1

;callprogress=yes
progzone=uk
tonezone = 4 ; 0 is US
jbenable = yes

[home-phones]
context=internal ; Uses the [internal] context in extensions.conf
signalling=fxo_ks ; was auto fxo_ks Use FXO signalling for an FXS channel - as set in sytem.conf.conf
channel => 1 ; Telephone attached to port 1
channel => 2 ; Telephone attached to port 2
dahdichan => 1,2


[pstn]
context=incoming-pstn-line ; Incoming calls go to [incoming-pstn-line] in extensions.conf
signalling=auto ; fxs_ks Use FXS signalling for an FXO channel - use as set in system.conf
faxdetect=incoming
busydetect=yes
;channel => 3
dahdichan => 3 ; PSTN attached to port 3

#include /etc/asterisk/dahdi-channels.conf

are there any changes I have to make here ?

It seems whenever I go Off Hook the Extension want’s to default to the [default] but for security I have not included = internal in the [default]

Any Hints?

THX

Steff

Found it …

needs to be off :wink:

Now I just need to figure out how I can dial external/internal with these Extensions

one last thing, when trying to dial from an analog Port it always goes directly to my [outgoing] which is included in my internal …

[outgoing]
exten => _09X!,1,Dial(DAHDI/3/${EXTEN})
exten => _09X!,2,Congestion
exten => _07X!,1,Dial(DAHDI/3/${EXTEN})
exten => _07X!,2,Congestion
exten => _147X!,1,Dial(DAHDI/3/${EXTEN})
exten => _14X!,2,Congestion
exten => _15X!,1,Dial(DAHDI/3/${EXTEN})
exten => _15X!,2,Congestion
exten => _999,1,Dial(DAHDI/3/${EXTEN})
exten => _999,2,Congestion
exten => _08X!,1,Dial(DAHDI/3/${EXTEN})
exten => _08X!,2,Congestion
exten => _02X!,1,Dial(DAHDI/3/${EXTEN})
exten => _02X!,2,Congestion
exten => _01X!,1,Dial(DAHDI/3/${EXTEN})
exten => _01X!,2,Congestion
exten => _118X!,1,Dial(DAHDI/3/${EXTEN})
exten => _118X!,2,Congestion
exten => _7X!,1,Dial(DAHDI/3/${EXTEN})
exten => _7X!,2,Congestion
exten => _8X!,1,Dial(DAHDI/3/${EXTEN})
exten => _8X!,2,Congestion

What would I need to change to be able to dial internally and dial external numbers as each times I go off hook with the analog phone and want to dial example 0771123456789 it matches _07x and sends the 3 digits to the PSTN and does no send the additional full number …

THX

Steff

The context is defaulting to internal, and only falling back to default because there is no match for an empty number (s).

I’ve not used a pure FXO/FXS system, so I’m not sure how incomplete numbers are handled, but your number patterns ought to at least code the minimum length of the numbers, e.g. _020XXXXXXXX!

In the US, the numbers, are, I think, all of predictable length, so it is easier for them.

I suspect this may be helpful:

voip-info.org/wiki/view/Aste … n+Matching

You should also be using . rather than !. The documentation isn’t clear, but, as well as matching zero digits, ! seems to stop looking for extra digits as soon as it is the only possible match, rather than waiting for a timeout.

Don’t use . on my London example, as all the digits have already been matched.

OK,

found my issue :wink:

I forgot about the chan_dahdi.conf.

Running dahdi show channels showed me that I had a context for the analog Ports called internal in th chan_dahdi.conf.

The Entries in the dahdi-channels.conf poing => to the chan_dahdi.conf and that check the extension.conf.

new addition just for my Fax:

[fax];see chan_dahdi and dahdi-channels exten => _07.,1,Dial(DAHDI/3/${EXTEN}) exten => _07.,2,Congestion exten => _020XXXXXXXX!,1,Dial(DAHDI/3/${EXTEN}) exten => _020XXXXXXXX!,2,,Congestion exten => _7XXXXXXX!,1,Dial(DAHDI/3/${EXTEN}) exten => _7XXXXXXX!,2,,Congestion exten => _8XXXXXXX!,1,Dial(DAHDI/3/${EXTEN}) exten => _8XXXXXXX!,2,,Congestion exten => _01XXXXXXXXX!,1,Dial(DAHDI/3/${EXTEN}) exten => _01XXXXXXXXX!,2,,Congestion exten => _147X!,1,Dial(DAHDI/3/${EXTEN}) exten => _14X!,2,Congestion exten => _15X!,1,Dial(DAHDI/3/${EXTEN} exten => _0049X.,1,Dial(DAHDI/3/${EXTEN}) exten => _0049X.,2,Congestion exten => _15X!,2,Congestion exten => _999,1,Dial(DAHDI/3/${EXTEN}) exten => _999,2,Congestion

THX

Steffen