[asterisk-users] Agent Pre Acknowledgement Message
Diarmaid O'Loughlin
dwo at qad.com
Wed Jan 24 09:15:05 MST 2007
I'm trying to wean my self using the Agent channel in Asterisk. The main
reason I use it is for the callback acknowledgement , where the user
presses # to finally acknowledge the call. I have implemented this in the
Dialplan using the Macro in the docs. This works well as long as the user
enters something.
However if the user hangs up , then both sides of the bridge call are hung
up as well , i.e. the customer calling waiting in the Queue, is hungup on.
I believe the problem is because the Read section of the dial plan will
return a -1 when the operator being called hangs up on it.
Has anyone else spotted this ? Anyone Solved the problem ?
[macro-screen]
exten=>s,1,Wait(.25)
exten=>s,2,Read(ACCEPT|screen-callee-options|1)
exten=>s,3,Gotoif($[${ACCEPT} = 1] ?50)
exten=>s,4,Gotoif($[${ACCEPT} = 2] ?30)
exten=>s,5,Gotoif($[${ACCEPT} = 3] ?40)
exten=>s,6,Gotoif($[${ACCEPT} = 4] ?30:30)
exten=>s,30,Set(MACRO_RESULT=CONTINUE)
exten=>s,40,Read(TEXTEN|custom/screen-exten|)
exten=>s,41,Gotoif($[${LEN(${TEXTEN})} = 3]?42:45)
exten=>s,42,Set(MACRO_RESULT=GOTO:from-internal^${TEXTEN}^1)
exten=>s,45,Gotoif($[${TEXTEN} = 0] ?46:4)
exten=>s,46,Set(MACRO_RESULT=CONTINUE)
exten=>s,50,Playback(after-the-tone)
exten=>s,51,Playback(connected)
exten=>s,52,Playback(beep)
Here is the console log for the even,
-- SIP/cosip-peer-09bfd798 answered Zap/25-1
-- Zap/1-1 answered Local/84013647 at acd-outgoing-ddce,2
-- Executing Wait("Zap/1-1", ".25") in new stack
-- Executing Read("Zap/1-1", "ACCEPT|custom/this-is-helpdesk|1") in
new stack
-- Accepting a maximum of 1 digits.
-- Playing 'custom/this-is-helpdesk' (language 'en')
-- Hungup 'Zap/25-1'
Destroying call '26afc28c2c0e95fb62fc205065fbd118 at 167.3.35.25'
-- Channel 0/1, span 1 got hangup request
-- User disconnected
Jan 24 15:13:12 WARNING[31943]: res_features.c:1384 ast_bridge_call:
Bridge failed on channels Local/84013647 at acd-outgoing-ddce,2 and Zap/1-1
-- Hungup 'Zap/1-1'
-- Agent/100 answered Zap/26-1
-- Stopped music on hold on Zap/26-1
-- Hungup 'Zap/26-1'
Thanks,
Diarmaid.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070124/e30a5ff1/attachment.htm
More information about the asterisk-users
mailing list