Need help with dialplan

Hi all,

I am close to giving up.

I got my hfc-s up and running with dahdi

[code]trunkgroups]

[channels]
language=de
switchtype=euroisdn

pridialplan=unknown
prilocaldialplan=unknown
internationalprefix = 00
nationalprefix = 0
;localprefix = VORWAHL
;privateprefix = VORWAHL+MSN
unknownprefix =
priindication = outofband
facilityenable = yes
usecallerid=yes
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
immediate=no
echocancel=yes
echocancelwhenbridged=yes
echotraining=yes
callgroup=1
pickupgroup=1
mohinterpret=default
mohsuggest=default
group=1
signalling=bri_cpe_ptmp
; p2p TE mode => bri_cpe
; p2mp TE mode => bri_cpe_ptmp
; p2p NT mode => bri_net
; p2mp NT mode => bri_net_ptmp
context=from-isdn
channel => 1-2
[/code]

as you can see in the extensions below, i tried many things and what i could observe was only the following:

  1. If I ;comment out the from-isdn section completely, the system will ignore every incomming call
  2. whatever I try to configure, asterisk will answer with “Channel ‘DAHDI/i1/0151123123123-1’ sent to invalid extension: context,exten,priority=default,12345,1”
  3. even the noop instruction creates “Channel ‘DAHDI/i1/0151123123123-1’ sent to invalid extension: context,exten,priority=default,12345,1”
    [b]
    Iam trying to make the asterisk to work like an isdn phone:
  • incomming calls should ring on sip 1000
  • it should be possible to also pick up the calls on the external ISDN-telephone, so no waiting line etc[/b]

[code][general]
static=yes
writeprotect=no
;autofallthrough=no
;extenpatternmatchnew=no
clearglobalvars=no
;userscontext=default

[internal]
;include => stdexten
;
; We start with what to do when a call first comes in.
;
;exten => s,1,Wait(1) ; Wait a second, just for fun
;exten => s,n,Answer ; Answer the line
;exten => s,n,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds
;exten => s,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds
;exten => s,n(restart),BackGround(demo-congrats) ; Play a congratulatory message
;exten => s,n(instruct),BackGround(demo-instruct) ; Play some instructions
;exten => s,n,WaitExten ; Wait for an extension to be dialed.

;exten => 2,1,BackGround(demo-moreinfo) ; Give some more information.
;exten => 2,n,Goto(s,instruct)

;exten => 3,1,Set(LANGUAGE()=fr) ; Set language to french
;exten => 3,n,Goto(s,restart) ; Start with the congratulations

exten => 1000,1,Goto(default,s,1)
exten => 1001,1,Goto(default,s,1)
exten => 1002,1,Goto(default,s,1)

[from-isdn]
;exten => 12345,1,Dial(SIP/1000,120)
;exten => 12345,1,Goto(default,s,1)

exten => 12345,1,noop()
exten => 12345,2,Set(LANGUAGE()=de) ; Set language to German

;exten => 12345,1,Answer()
;exten => 12345,2,Wait(2)
;exten => 12345,3,Playback(hello-world)
;exten => 12345,4,Wait(2)
;exten => 12345,5,Hangup()

[globals]
CONSOLE=Console/dsp ; Console interface for demo
;CONSOLE=DAHDI/1
;CONSOLE=Phone/phone0
IAXINFO=guest ; IAXtel username/password
;IAXINFO=myuser:mypass
TRUNK=DAHDI/G2 ; Trunk interface
TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0)
;TRUNK=IAX2/user:pass@provider
;FREENUMDOMAIN=mydomain.com ; domain to send on outbound
; freenum calls (uses outbound-freenum
; context)
[/code]

add a line to your from-isdn context like

exten => _X.,1,Noop(caller ${CALLERID(all) called ${EXTEN} TTFN)
exten => _X.,n,Dial(SIP/1000,120)

Hi, thanks
before you posted, I found out that this did the trick, i dont know why

[default]
include => from-isdn
include => internal

Don’t you just hate that something works but you just don’t know why? :smiley: :smiley: :smiley: :smiley: