Any one have success with Dial M option, Can some one provide an example?<br><br><div class="gmail_quote">On Thu, Dec 3, 2009 at 12:57 PM, ABBAS SHAKEEL <span dir="ltr"><<a href="mailto:shakeel.abbas.qau@gmail.com">shakeel.abbas.qau@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello,<div><br></div><div>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.</div>
<div>For this purpose i am using <a href="http://www.voip-info.org/wiki/view/Asterisk+cmd+Dial" target="_blank">this link</a>. </div>
<div><b>I am using this option :- </b></div><div><span style="font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;font-size:12px"><strong>M(</strong><em>x</em><strong>)</strong>: 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).</span></div>
<div><font face="Verdana, Geneva, Arial, Helvetica, sans-serif" size="3"><span style="font-size:12px"><br></span></font></div><div><font face="Verdana, Geneva, Arial, Helvetica, sans-serif" size="3"><span style="font-size:12px"><b>I am following this Example :-</b></span></font></div>
<div><font face="Verdana, Geneva, Arial, Helvetica, sans-serif" size="3"><span style="font-size:12px"><b><br></b></span></font></div><div><font face="Verdana, Geneva, Arial, Helvetica, sans-serif" size="3"><span style="font-size:12px"><strong>Example 2:</strong> Dial macro <br>
<div style="padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;margin-top:5px;margin-right:5px;margin-bottom:5px;margin-left:5px;border-top-width:1px;border-top-style:solid;border-top-color:rgb(240, 240, 240);border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(240, 240, 240);border-left-width:5px;border-left-style:solid;border-left-color:rgb(153, 0, 0);border-right-width:5px;border-right-style:solid;border-right-color:rgb(153, 0, 0);background-repeat:initial;background-color:rgb(245, 245, 245)">
screen-record: Please record your name press pound when finished. <br>screen-from: You have a call from <br>screen-accept: Press 1 to accept this call or any other key to reject. <br><br>exten => 890,1,Wait(0.2) <br>exten => 890,n,Playback(screen-record) <br>
exten => 890,n,SetVar(SCREEN_FILE=/tmp/${CALLERID(number)}-${EPOCH}) <br>exten => 890,n,Record(${SCREEN_FILE}.gsm|6|25) <br>exten => 890,n,Dial(SIP/16|60|gM(screen^${SCREEN_FILE})) <br>exten => 890,n,Voicemail(10@default) <br>
<br>[macro-screen] <br>exten => s,1,Wait(0.2) <br>exten => s,n,Playback(screen-from) <br>exten => s,n,Playback(${ARG1}) <br>exten => s,n,Read(ACCEPT|screen-accept|1) <br>exten => s,n,GotoIf($[${ACCEPT} = 1 ] ?yes:no) <br>
exten => s,n(yes),SetVar(MACRO_RESULT=CONTINUE) <br>exten => s,n(no),System(/bin/rm ${ARG1}) </div></span></font>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<br>
-- <br>Kind Regards<br>Shakeel Abbas<br><br>
</div>
</blockquote></div><br><br clear="all"><br>-- <br>Best Regards<br>Shakeel Abbas<br><br>