Flash() = Hangup?

I made a dynamic_feature for flashing. But when i press feature button for flashing asterisk hang ups call. How can i solve this?

extensions.conf

[from-pstn] exten => s,1,set(__DYNAMIC_FEATURES=zapflash);

features.conf

[code][general]
featuredigittimeout = 1000

[applicationmap]
zapflash => #,callee,Flash,[/code]

chan_dahdi.conf

[code][channels]
context=from-pstn
signalling=fxs_ks
rxwink=300 ; Atlas seems to use long (250ms) winks
usecallerid=yes
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
flash=400

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

immediate=no[/code]

Are you sure the other end isn’t initiating the hangup?

You need to provide verbose logging and probably the dahdi channel debugging output.

It is interesting sometimes working, sometimes hang up. My switchboard flash timing is 750ms. I will try debugging.

I don’t understand this warning. I am calling from switchboard extension to sip extension and make flash from sip extension.

[Nov 4 20:06:46] VERBOSE[15891] res_musiconhold.c: -- Stopped music on hold on DAHDI/1-1 [Nov 4 20:06:51] VERBOSE[15892] features.c: -- Feature Found: zapflash exten: zapflash [Nov 4 20:06:51] VERBOSE[15892] features.c: -- Feature Found: zapflash exten: zapflash [Nov 4 20:06:51] WARNING[15892] app_flash.c: Local/1100@from-queue-471e;2 is not a DAHDI channel [Nov 4 20:06:51] VERBOSE[15892] pbx.c: -- Executing [h@macro-dial:1] Macro("Local/1100@from-queue-471e;2", "hangupcall") in new stack

Without either the dialplan or verbose level 3 output showing its execution, we can only guess.

It would appear that you have a local channel between your SIP and dahdi channel.

This is verbose level 3 output.

This is interesting:

") in new stack -- Executing [s@macro-exten-vm:8] Macro("Local/1200@from-queue-f5c9;2", "rec ord-enable,1200,IN") in new stack -- Executing [s@macro-record-enable:1] GotoIf("Local/1200@from-queue-f5c9;2" , "1?check") in new stack -- Goto (macro-record-enable,s,4) -- Executing [s@macro-record-enable:4] ExecIf("Local/1200@from-queue-f5c9;2" , "0?MacroExit()") in new stack -- Executing [s@macro-record-enable:5] GotoIf("Local/1200@from-queue-f5c9;2" , "0?Group:OUT") in new stack -- Goto (macro-record-enable,s,15) -- Executing [s@macro-record-enable:15] GotoIf("Local/1200@from-queue-f5c9;2 ", "1?IN") in new stack -- Goto (macro-record-enable,s,20) -- Executing [s@macro-record-enable:20] ExecIf("Local/1200@from-queue-f5c9;2 ", "1?MacroExit()") in new stack -- Executing [s@macro-exten-vm:9] Macro("Local/1200@from-queue-f5c9;2", "dial ,,trM(auto-blkvm),1200") in new stack -- Executing [s@macro-dial:1] GotoIf("Local/1200@from-queue-f5c9;2", "1?dial ") in new stack -- Goto (macro-dial,s,3) -- Executing [s@macro-dial:3] AGI("Local/1200@from-queue-f5c9;2", "dialparti es.agi") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi dialparties.agi: Starting New Dialparties.agi dialparties.agi: Caller ID name is '2110' number is '2110' dialparties.agi: Methodology of ring is 'none' -- dialparties.agi: Added extension 1100 to extension map -- dialparties.agi: Extension 1100 cf is disabled -- dialparties.agi: Extension 1100 do not disturb is disabled dialparties.agi: EXTENSION_STATE: 0 (NOT_INUSE) dialparties.agi: Extension 1100 has ExtensionState: 0 -- dialparties.agi: Checking CW and CFB status for extension 1100 -- dialparties.agi: dbset CALLTRACE/1100 to 2110 -- dialparties.agi: Filtered ARG3: 1100 -- <Local/1100@from-queue-28c0;2>AGI Script dialparties.agi completed, retur ning 0 -- Executing [s@macro-dial:7] Dial("Local/1100@from-queue-28c0;2", "SIP/1100 ,,trM(auto-blkvm)") in new stack == Using SIP RTP TOS bits 184 == Using SIP RTP CoS mark 5 -- Called 1100 -- Local/1100@from-queue-28c0;1 is ringing dialparties.agi: Starting New Dialparties.agi dialparties.agi: Caller ID name is '2110' number is '2110' dialparties.agi: Methodology of ring is 'none' -- dialparties.agi: Added extension 1200 to extension map -- dialparties.agi: Extension 1200 cf is disabled -- dialparties.agi: Extension 1200 do not disturb is disabled dialparties.agi: EXTENSION_STATE: 4 (UNAVAILABLE) dialparties.agi: Extension 1200 has ExtensionState: 4 -- dialparties.agi: Checking CW and CFB status for extension 1200 -- dialparties.agi: dbset CALLTRACE/1200 to 2110 -- dialparties.agi: Filtered ARG3: 1200 -- <Local/1200@from-queue-f5c9;2>AGI Script dialparties.agi completed, retur ning 0 -- Executing [s@macro-dial:7] Dial("Local/1200@from-queue-f5c9;2", "SIP/1200 ,,trM(auto-blkvm)") in new stack == Using SIP RTP TOS bits 184 == Using SIP RTP CoS mark 5 [Nov 4 21:55:14] WARNING[3536]: app_dial.c:1780 dial_exec_full: Unable to creat e channel of type 'SIP' (cause 20 - Unknown) == Everyone is busy/congested at this time (1:0/0/1) -- Executing [s@macro-dial:8] Set("Local/1200@from-queue-f5c9;2", "DIALSTATU S=CHANUNAVAIL") in new stack -- Executing [s@macro-dial:9] GosubIf("Local/1200@from-queue-f5c9;2", "0?CHA NUNAVAIL,1") in new stack -- Executing [s@macro-exten-vm:10] GotoIf("Local/1200@from-queue-f5c9;2", "0 ?exit,return") in new stack -- Executing [s@macro-exten-vm:11] Set("Local/1200@from-queue-f5c9;2", "SV_D IALSTATUS=CHANUNAVAIL") in new stack -- Executing [s@macro-exten-vm:12] GosubIf("Local/1200@from-queue-f5c9;2", " 0?docfu,1") in new stack -- Executing [s@macro-exten-vm:13] GosubIf("Local/1200@from-queue-f5c9;2", " 0?docfb,1") in new stack -- Executing [s@macro-exten-vm:14] Set("Local/1200@from-queue-f5c9;2", "DIAL STATUS=CHANUNAVAIL") in new stack -- Executing [s@macro-exten-vm:15] NoOp("Local/1200@from-queue-f5c9;2", "Voi cemail is 'novm'") in new stack -- Executing [s@macro-exten-vm:16] GotoIf("Local/1200@from-queue-f5c9;2", "1 ?s-CHANUNAVAIL,1") in new stack -- Goto (macro-exten-vm,s-CHANUNAVAIL,1) -- Executing [s-CHANUNAVAIL@macro-exten-vm:1] NoOp("Local/1200@from-queue-f5 c9;2", "IVR_RETVM: IVR_CONTEXT: ") in new stack -- Executing [s-CHANUNAVAIL@macro-exten-vm:2] GotoIf("Local/1200@from-queue- f5c9;2", "0?exit,1") in new stack -- Executing [s-CHANUNAVAIL@macro-exten-vm:3] PlayTones("Local/1200@from-que ue-f5c9;2", "congestion") in new stack -- Executing [s-CHANUNAVAIL@macro-exten-vm:4] Congestion("Local/1200@from-qu eue-f5c9;2", "10") in new stack -- Local/1200@from-queue-f5c9;1 is circuit-busy -- Nobody picked up in 0 ms == Spawn extension (macro-exten-vm, s-CHANUNAVAIL, 4) exited non-zero on 'Loca l/1200@from-queue-f5c9;2' in macro 'exten-vm' == Spawn extension (from-internal, 1200, 1) exited non-zero on 'Local/1200@fro m-queue-f5c9;2' -- Executing [h@from-internal:1] Macro("Local/1200@from-queue-f5c9;2", "hang upcall") in new stack -- Executing [s@macro-hangupcall:1] GotoIf("Local/1200@from-queue-f5c9;2", " 1?noautomon") in new stack -- Goto (macro-hangupcall,s,3) -- Executing [s@macro-hangupcall:3] NoOp("Local/1200@from-queue-f5c9;2", "TO UCH_MONITOR_OUTPUT=") in new stack -- Executing [s@macro-hangupcall:4] GotoIf("Local/1200@from-queue-f5c9;2", " 1?noautomon2") in new stack -- Goto (macro-hangupcall,s,6) -- Executing [s@macro-hangupcall:6] NoOp("Local/1200@from-queue-f5c9;2", "MO NITOR_FILENAME=") in new stack -- Executing [s@macro-hangupcall:7] GotoIf("Local/1200@from-queue-f5c9;2", " 1?skiprg") in new stack -- Goto (macro-hangupcall,s,10) -- Executing [s@macro-hangupcall:10] GotoIf("Local/1200@from-queue-f5c9;2", "1?skipblkvm") in new stack -- Goto (macro-hangupcall,s,13) -- Executing [s@macro-hangupcall:13] GotoIf("Local/1200@from-queue-f5c9;2", "1?theend") in new stack -- Goto (macro-hangupcall,s,15) -- Executing [s@macro-hangupcall:15] Hangup("Local/1200@from-queue-f5c9;2", "") in new stack == Spawn extension (macro-hangupcall, s, 15) exited non-zero on 'Local/1200@fr om-queue-f5c9;2' in macro 'hangupcall' == Spawn extension (from-internal, h, 1) exited non-zero on 'Local/1200@from-q ueue-f5c9;2' -- SIP/1100-00000000 is ringing -- Local/1100@from-queue-28c0;1 is ringing -- SIP/1100-00000000 answered Local/1100@from-queue-28c0;2 -- Executing [s@macro-auto-blkvm:1] Set("SIP/1100-00000000", "__MACRO_RESULT =") in new stack -- Executing [s@macro-auto-blkvm:2] NoOp("SIP/1100-00000000", "Deleting: BLK VM/123/DAHDI/1-1 TRUE") in new stack -- Local/1100@from-queue-28c0;1 answered DAHDI/1-1 -- Stopped music on hold on DAHDI/1-1 -- Feature Found: zapflash exten: zapflash -- Feature Found: zapflash exten: zapflash [Nov 4 21:55:20] WARNING[3535]: app_flash.c:82 flash_exec: Local/1100@from-queu e-28c0;2 is not a DAHDI channel -- Executing [h@macro-dial:1] Macro("Local/1100@from-queue-28c0;2", "hangupc all") in new stack -- Executing [s@macro-hangupcall:1] GotoIf("Local/1100@from-queue-28c0;2", " 1?noautomon") in new stack -- Goto (macro-hangupcall,s,3) -- Executing [s@macro-hangupcall:3] NoOp("Local/1100@from-queue-28c0;2", "TO UCH_MONITOR_OUTPUT=") in new stack -- Executing [s@macro-hangupcall:4] GotoIf("Local/1100@from-queue-28c0;2", " 1?noautomon2") in new stack -- Goto (macro-hangupcall,s,6) -- Executing [s@macro-hangupcall:6] NoOp("Local/1100@from-queue-28c0;2", "MO NITOR_FILENAME=") in new stack -- Executing [s@macro-hangupcall:7] GotoIf("Local/1100@from-queue-28c0;2", " 1?skiprg") in new stack -- Goto (macro-hangupcall,s,10) -- Executing [s@macro-hangupcall:10] GotoIf("Local/1100@from-queue-28c0;2", "1?skipblkvm") in new stack -- Goto (macro-hangupcall,s,13) -- Executing [s@macro-hangupcall:13] GotoIf("Local/1100@from-queue-28c0;2", "1?theend") in new stack -- Goto (macro-hangupcall,s,15) -- Executing [s@macro-hangupcall:15] Hangup("Local/1100@from-queue-28c0;2", "") in new stack == Spawn extension (macro-hangupcall, s, 15) exited non-zero on 'Local/1100@fr om-queue-28c0;2' in macro 'hangupcall' == Spawn extension (macro-dial, h, 1) exited non-zero on 'Local/1100@from-queu e-28c0;2' -- Executing [s@macro-dial:8] Set("Local/1100@from-queue-28c0;2", "DIALSTATU S=ANSWER") in new stack -- Executing [s@macro-dial:9] GosubIf("Local/1100@from-queue-28c0;2", "0?ANS WER,1") in new stack -- Executing [s@macro-exten-vm:10] GotoIf("Local/1100@from-queue-28c0;2", "0 ?exit,return") in new stack -- Executing [s@macro-exten-vm:11] Set("Local/1100@from-queue-28c0;2", "SV_D IALSTATUS=ANSWER") in new stack -- Executing [s@macro-exten-vm:12] GosubIf("Local/1100@from-queue-28c0;2", " 0?docfu,1") in new stack -- Executing [s@macro-exten-vm:13] GosubIf("Local/1100@from-queue-28c0;2", " 0?docfb,1") in new stack -- Executing [s@macro-exten-vm:14] Set("Local/1100@from-queue-28c0;2", "DIAL STATUS=ANSWER") in new stack -- Executing [s@macro-exten-vm:15] NoOp("Local/1100@from-queue-28c0;2", "Voi cemail is 'novm'") in new stack -- Executing [s@macro-exten-vm:16] GotoIf("Local/1100@from-queue-28c0;2", "1 ?s-ANSWER,1") in new stack -- Goto (macro-exten-vm,s-ANSWER,1) -- Executing [s-ANSWER@macro-exten-vm:1] NoOp("Local/1100@from-queue-28c0;2" , "IVR_RETVM: IVR_CONTEXT: ") in new stack -- Executing [s-ANSWER@macro-exten-vm:2] GotoIf("Local/1100@from-queue-28c0; 2", "0?exit,1") in new stack -- Executing [s-ANSWER@macro-exten-vm:3] PlayTones("Local/1100@from-queue-28 c0;2", "congestion") in new stack -- Executing [s-ANSWER@macro-exten-vm:4] Congestion("Local/1100@from-queue-2 8c0;2", "10") in new stack == Spawn extension (ext-queues, 123, 9) exited non-zero on 'DAHDI/1-1' -- Hungup 'DAHDI/1-1' == Spawn extension (macro-exten-vm, s-ANSWER, 4) exited non-zero on 'Local/110 0@from-queue-28c0;2' in macro 'exten-vm' == Spawn extension (from-internal, 1100, 1) exited non-zero on 'Local/1100@fro m-queue-28c0;2' -- Executing [h@from-internal:1] Macro("Local/1100@from-queue-28c0;2", "hang upcall") in new stack -- Executing [s@macro-hangupcall:1] GotoIf("Local/1100@from-queue-28c0;2", " 1?noautomon") in new stack -- Goto (macro-hangupcall,s,3) -- Executing [s@macro-hangupcall:3] NoOp("Local/1100@from-queue-28c0;2", "T UCH_MONITOR_OUTPUT=") in new stack -- Executing [s@macro-hangupcall:4] GotoIf("Local/1100@from-queue-28c0;2", 1?noautomon2") in new stack -- Goto (macro-hangupcall,s,6) -- Executing [s@macro-hangupcall:6] NoOp("Local/1100@from-queue-28c0;2", "M NITOR_FILENAME=") in new stack -- Executing [s@macro-hangupcall:7] GotoIf("Local/1100@from-queue-28c0;2", 1?skiprg") in new stack -- Goto (macro-hangupcall,s,10) -- Executing [s@macro-hangupcall:10] GotoIf("Local/1100@from-queue-28c0;2", "1?skipblkvm") in new stack -- Goto (macro-hangupcall,s,13) -- Executing [s@macro-hangupcall:13] GotoIf("Local/1100@from-queue-28c0;2", "1?theend") in new stack -- Goto (macro-hangupcall,s,15) -- Executing [s@macro-hangupcall:15] Hangup("Local/1100@from-queue-28c0;2", "") in new stack == Spawn extension (macro-hangupcall, s, 15) exited non-zero on 'Local/1100@f om-queue-28c0;2' in macro 'hangupcall' == Spawn extension (from-internal, h, 1) exited non-zero on 'Local/1100@from- ueue-28c0;2' localhost*CLI>

Incomplete.

You need to go back before the Dial, etc., that initiates priority 1. This is priority 7. You probably need to talk to whoever wrote the dialplan, as it looks like it is complicated.

I think i found the problem. But how can i solve this? I must use queue…

When i direct call to 1100 it is working great.

You need to set DYNAMIC_FEATURES so that it is not set on the Dial to the local channel.

How can i do this?

By putting the Set so it is only run after the local channel dial.

Sorry but i don’t understand.

Where should i put this set line?

current set line is here

[from-pstn]
exten => s,1,set(__DYNAMIC_FEATURES=zapflash);

I removed the set line.
I added DYNAMIC_FEATURES=zapflash to globals_custom.conf
Dynamic features working but it is hang up calls when i press feature button.

How can i solve this? Please help me.

If you don’t understand what I mean by “after the local channel dial”, you will need to provide your dialplan.

Setting it globably will cause it to be run on the wrong side of the local channel, where it fails because it is not running against a dahdi channel, and the failure causes the dialplan to terminate.

I don’t have a complex dialplan. I made below steps.
When i call to asterisk queue catches the call and forwards it to extension. So firstly dahdi channel connects to queue local channel and then queue local channel connects to sip channel. When i press feature button it says that it is not a dahdi channel. Yes because forwarding occurs and dahdi channel forwarded to local queue channel. When i press feature button it is seeing local queue channel not dahdi channel. Also when i direct call to sip extension then it is working great because there is not a local queue channel between dahdi and sip.

Sorry, i don’t know what are dial plan files. If you give me file names i can put it here. Thank you very much for your interest.

1.Clean install of elastix.
2.Installed ethernet driver.
3.Installed telephony card driver.
4.Created three extensions.
5.Created one queue.
6.Created one incoming route for catching all incoming calls and forward it to queue.
7.Added busydetect=yes, busycount=yes, callprogress=yes, flash=400 lines to chan_dahdi.
8.Added featuredigittimeout=1000 line to features_general_custom.
9.Added zapflash => *,callee,flash, line to features_applicationmap_custom.
10.Added [ext-local-custom], exten => s,1,set(__DYNAMIC_FEATURES=zapflash) lines to extensions_custom.

Please take this to an elastix forum. You are probably going to have to modify the elastix code directly.

So if i install asterisknow is it work?
I don’t think this is elastix problem.

Because you are using a GUI, you do not understand instructions on how to modify the dialplan so that the feature is implemented on the correct channel. It is quite possible that the design of GUI dialplan is such that this can only be done by changing parts of it which are not supposed to be customised. I have no idea what is in the Elastix dialplan, so I don’t know why it is using a local channel and don’t know where one would have to modify it so that the feature was run on the actual dahdi channel.

You therefore need to go to a forum that has expertise on the GUI you are using. This forum would not be suitable for AsteriskNow, either.

[size=150]corumozelhastanesi and david55, Hello, could you fix it? I have the same problem, can you help me[/size]