Strange thing happen with dialplan

I have a ISDN phone connect to a Digium b410p card.
Is working fine but there are some strange thing with the dialplan, with this simple dialplan


    [from-dahdi]
    exten => 1796522,1,Dial(DAHDI/g12/${EXTEN})
    exten => 1796522,2,Hangup()
    
    exten => s,1,Wait(10)
    exten => s,2,Answer
    exten => s,3,Dial(DAHDI/g12/${EXTEN})
    
    [local]
    ;
    ; Master context for local, toll-free, and iaxtel calls only
    ;
    include => default
    include => from-dahdi
    
    exten => 600,1,Playback(demo-echotest) ; Let them know what’s going on
    exten => 600,2,Echo ; Do the echo test
    exten => 600,3,Playback(demo-echodone) ; Let them know it’s over

When I call the 600, i have to answer by my own phone(i call 600 but my phone said there is a call from my own number 1796522!) and if I answer I hear the music.

If I remove the line exten => s,3,Dial(DAHDI/g12/${EXTEN}) the call give a timeout
What I miss?

Show us a call trace

1 Like

I don’t know how to make a trace call, with pri debug is ok?
This is with pri debug enabled

Using this configuration


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(CHANNEL(language)=fr)          ; Set language to french
exten => 3,n,Goto(s,restart)            ; Start with the congratulations
exten => 1000,1,Goto(default,s,1)

seems to work, but I cannot still reach the 600 extension

https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information

1 Like

core set debug 10000

Core debug was OFF and is now 10000.
    -- Accepting call from '1796522' to 's' on channel 0/2, span 2
    -- Executing [s@from-dahdi:1] Wait("DAHDI/i2/1796522-2", "1") in new stack
    -- Executing [s@from-dahdi:2] Answer("DAHDI/i2/1796522-2", "") in new stack
    -- Auto fallthrough, channel 'DAHDI/i2/1796522-2' status is 'UNKNOWN'
    -- Hungup 'DAHDI/i2/1796522-2'

cdr set debug on   
0x7fd62c001b10 - Created CDR for channel DAHDI/i2/1796522-3
0x7fd62c001b10 - Transitioning CDR for DAHDI/i2/1796522-3 from state NONE to Single
    -- Accepting call from '1796522' to 's' on channel 0/2, span 2
    -- Executing [s@from-dahdi:1] Wait("DAHDI/i2/1796522-3", "1") in new stack
    -- Executing [s@from-dahdi:2] Answer("DAHDI/i2/1796522-3", "") in new stack
0x7fd62c001b10 - Set answered time to 1635205375.764349
    -- Auto fallthrough, channel 'DAHDI/i2/1796522-3' status is 'UNKNOWN'
    -- Hungup 'DAHDI/i2/1796522-3'
0x7fd62c001b10 - Transitioning CDR for DAHDI/i2/1796522-3 from state Single to Finalized
0x7fd62c001b10 - Beginning finalize/dispatch for DAHDI/i2/1796522-3
0x7fd62c001b10 - Dispatching CDR for Party A DAHDI/i2/1796522-3, Party B <none>

For some reason, your priority 3 for the s extension doesn’t exist. You might want to run dialplan show and also look for non-printing characters.

1 Like

Now I’m tryng this dialplan

[default]

; Wait 15 seconds for an answer (pick up the local phone)
exten => s,1,Wait(10)
; Answer the phone
exten => s,2,Answer
; They must respond within 10 seconds
; else jump to priority t (terminate call)
exten => s,4,DigitTimeout(3)
exten => s,5,ResponseTimeout(10)
exten => t,2,Hangup

[from-dahdi]
exten => 1796522,1,Dial(DAHDI/g12/${EXTEN})
exten => 1796522,2,Hangup()

[local]
;
; Master context for local, toll-free, and iaxtel calls only
;
include => default
include => from-dahdi

exten => 600,1,Playback(demo-echotest) ; Let them know what’s going on
exten => 600,2,Echo ; Do the echo test
exten => 600,3,Playback(demo-echodone) ; Let them know it’s over

dialplan show said

[ Context ‘func_periodic_hook_context’ created by ‘func_periodic_hook’ ]
‘beep’ (CID match ‘’) => 1. Answer() [func_periodic_hook]
2. Playback(beep) [func_periodic_hook]
‘hook’ (CID match ‘’) => 1. Set(EncodedChannel=${CUT(HOOK_CHANNEL,-,1-2)}) [func_periodic_hook]
2. Set(GROUP_NAME=${EncodedChannel}${HOOK_ID}) [func_periodic_hook]
3. Set(GROUP(periodic-hook)=${GROUP_NAME}) [func_periodic_hook]
4. ExecIf($[${GROUP_COUNT(${GROUP_NAME}@periodic-hook)} > 1]?Hangup()) [func_periodic_hook]
5. Set(ChannelToSpy=${URIDECODE(${EncodedChannel})}) [func_periodic_hook]
6. ChanSpy(${ChannelToSpy},qEB) [func_periodic_hook]

[ Context ‘local’ created by ‘pbx_config’ ]
‘600’ => 1. Playback(demo-echotest) [extensions.conf:27]
2. Echo() [extensions.conf:28]
3. Playback(demo-echodone) [extensions.conf:29]
Include => ‘default’ [pbx_config]
Include => ‘from-dahdi’ [pbx_config]

[ Context ‘from-dahdi’ created by ‘pbx_config’ ]
‘1796522’ => 1. Dial(DAHDI/g12/${EXTEN}) [extensions.conf:14]
2. Hangup() [extensions.conf:15]

[ Context ‘default’ created by ‘pbx_config’ ]
‘s’ => 1. Wait(10) [extensions.conf:4]
2. Answer() [extensions.conf:6]
4. DigitTimeout(3) [extensions.conf:9]
5. ResponseTimeout(10) [extensions.conf:10]
‘t’ => 2. Hangup() [extensions.conf:11]

-= 7 extensions (20 priorities) in 4 contexts. =-

What did you think of this?

[from-dahdi]
include => local
exten => 1796522,1,Dial(DAHDI/g12/${EXTEN})
exten => 1796522,2,Hangup()

exten => s,1,Answer()
exten => s,2,Wait(1)
exten => s,3,Dial(${CONTEXT}/${EXTEN})
exten => s,3,Hangup()

[local]
include => default
include => from-dahdi

exten => 600,1,Playback(demo-echotest) ; Let them know what’s going on
exten => 600,2,Echo ; Do the echo test
exten => 600,3,Playback(demo-echodone) ; Let them know it’s over

~
give me the error


"[Oct 26 03:11:16] WARNING[8436][C-00000001]: channel.c:6248 request_channel: No channel type registered for 'from-dahdi'
[Oct 26 03:11:16] WARNING[8436][C-00000001]: app_dial.c:2576 dial_exec_full: Unable to create channel of type 'from-dahdi' (cause 66 - Channel not implemented)

That definitely doesn’t have a priority 3, so will never get past the Answer.

1 Like

Finally I have solved the first 50% of problem

Reading from this howto https://bach-online.de/make-internet-calls-with-a-real-isdn-phone/ i modify my /etc/asterisk/chan_dahdi.conf adding/modify those lines.


overlapdial=yes
immediate=no

Now from the isdn phone I can call the sip phone and finally the internal extensions answer, this is the extensions.conf

[from-dahdi]
include => local
exten => 1796522,1,Dial(DAHDI/g12/${EXTEN})
exten => 1796522,2,Hangup()

exten => s,1,Answer()
exten => s,2,Dial(Local/${EXTEN},10,t,m)
exten => s,4,Hangup()

[local]
include => from-dahdi

exten => 1001,1,Dial(SIP/telefono1,20,Ttm)
same  => n,Hangup

exten => 7500,1,VoicemailMain(@mycontext)

exten => 600,1,Answer()
exten => 600,2,Playback(demo-echotest) ; Let them know what
exten => 600,3,Echo()                  ; Do the echo test
exten => 600,4,Playback(demo-echodone) ; Let them know it
exten => 600,5,Hangup()

I still have the problem of the isdn-ta adapter (can receive the answer, but cannot call)
but problably is hw problem, hw misconfigured, os misconfigured, but at least I have solved the dialplan problem, thanks for help

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.