[asterisk-users] Dial application with M option
ABBAS SHAKEEL
shakeel.abbas.qau at gmail.com
Thu Dec 3 01:57:28 CST 2009
Hello,
What i am trying to do is ..... Dail a number and ask if you wana talk to
XXX press 1 and if you dont wana talk press any other key.
For this purpose i am using this
link<http://www.voip-info.org/wiki/view/Asterisk+cmd+Dial>
.
*I am using this option :- *
*M(**x**)*: Executes the macro (x) upon connect of the call (i.e. when the
called party answers). IMPORTANT - The CDR 'billsecs' field is set to zero
if the callee answers the call, but hangs up whilst the macro is still
running (if the callee answers and the macro finishes, 'billsecs' contains
the correct value).
*I am following this Example :-*
*
*
*Example 2:* Dial macro
screen-record: Please record your name press pound when finished.
screen-from: You have a call from
screen-accept: Press 1 to accept this call or any other key to reject.
exten => 890,1,Wait(0.2)
exten => 890,n,Playback(screen-record)
exten => 890,n,SetVar(SCREEN_FILE=/tmp/${CALLERID(number)}-${EPOCH})
exten => 890,n,Record(${SCREEN_FILE}.gsm|6|25)
exten => 890,n,Dial(SIP/16|60|gM(screen^${SCREEN_FILE}))
exten => 890,n,Voicemail(10 at default)
[macro-screen]
exten => s,1,Wait(0.2)
exten => s,n,Playback(screen-from)
exten => s,n,Playback(${ARG1})
exten => s,n,Read(ACCEPT|screen-accept|1)
exten => s,n,GotoIf($[${ACCEPT} = 1 ] ?yes:no)
exten => s,n(yes),SetVar(MACRO_RESULT=CONTINUE)
exten => s,n(no),System(/bin/rm ${ARG1})
THE PROBLEM IS when the called party picks up the phone The call get
connected between the caller and callee. But I want it must ask the callee
if (s)he wana talk if press yes then connect else not. Please shed some
light on it
--
Kind Regards
Shakeel Abbas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20091203/c9bf2932/attachment.htm
More information about the asterisk-users
mailing list