# Need help with dialplan

**URL:** <https://community.asterisk.org/t/need-help-with-dialplan/42912>\
**Category:** Asterisk Support\
**Created:** [May 27, 2013, 8:34pm UTC](https://community.asterisk.org/t/need-help-with-dialplan/42912 "2013-05-27T20:34:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bastibasti](https://avatars.discourse-cdn.com/v4/letter/b/b19c9b/32.png) [@bastibasti](https://community.asterisk.org/u/bastibasti)\
**Post date:** [May 27, 2013, 8:34pm UTC](https://community.asterisk.org/t/need-help-with-dialplan/42912/1 "2013-05-27T20:34:56Z")

</div>

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](http://FREENUMDOMAIN=mydomain.com) ; domain to send on outbound  
; freenum calls (uses outbound-freenum  
; context)  
[/code]

---

<div class="post-metadata">

**Author:** ![ianplain](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/ianplain/32/1776_2.png) [@ianplain](https://community.asterisk.org/u/ianplain)\
**Post date:** [May 28, 2013, 9:11am UTC](https://community.asterisk.org/t/need-help-with-dialplan/42912/2 "2013-05-28T09:11:38Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![bastibasti](https://avatars.discourse-cdn.com/v4/letter/b/b19c9b/32.png) [@bastibasti](https://community.asterisk.org/u/bastibasti)\
**Post date:** [May 29, 2013, 4:51pm UTC](https://community.asterisk.org/t/need-help-with-dialplan/42912/3 "2013-05-29T16:51:01Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![dejanst](https://avatars.discourse-cdn.com/v4/letter/d/9fc348/32.png) [@dejanst](https://community.asterisk.org/u/dejanst)\
**Post date:** [May 30, 2013, 4:32pm UTC](https://community.asterisk.org/t/need-help-with-dialplan/42912/4 "2013-05-30T16:32:54Z")

</div>

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