selmak se
2009-Jul-03 15:42 UTC
[asterisk-users] Fw: Trigger an action when B number answers the call
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><title></title><head><meta http-equiv="Content-type" content="text/html; charset=UTF-8" /><style type="text/css"> html, body {overflow-x: visible; } html { width:100%; height:100%;margin:0px; padding:0px; overflow-y: auto; overflow-x: auto; }body { font-size: 100.01%; font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; background-color:transparent; overflow:show; background-image:none; margin:0px; padding:5px; }p { margin:0px; padding:0px; } body { font-size: 12px; font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; background-color: #FFFFFF; } p { margin: 0; padding: 0; } blockquote { padding-left: 5px; margin-left: 5px; margin-bottom: 0px; margin-top: 0px; } blockquote.quote { border-left: 1px solid #CCC; padding-left: 5px; margin-left: 5px; } .misspelled { background: transparent url(//images.gmx.com/images/outsource/application/mailclient/com/resource/mailclient/widgets/basic/parts/maileditor/spellchecking_underline--2059579451-2009-2.gif) repeat-x scroll center bottom; } .correct {} .unknown {} .ignored {}</style></head><body id="bodyElement" style=""> <p size="2" style="font-family: Verdana;"><br></p><p> </p><p></p><blockquote class="quote" style="font-size: 12px;" face="Verdana" type="cite"><br><p><br></p><p> </p><div id="bodyElement" style="margin: 0pt; padding: 0pt;"> <p style="font-family: Verdana;"><span></span></p> <p id="__paragraph__1246634935000" style=""> </p> <p style="margin-bottom: 0in;">Hello,</p> <p style="margin-bottom: 0in;"><br></p> <p style="margin-bottom: 0in;"><br></p> <p style="margin-bottom: 0in;"> I was trying to trigger an action (using AGI) when the recipient of a call (B number) answers his phone. (Actually the goal is to send a signal to an external server when the call starts )</p> <p style="margin-bottom: 0in;"><span></span></p> <p id="__paragraph__1246634952000" style="margin-bottom: 0in;"><span></span></p> <p id="__paragraph__1246634953000" style="margin-bottom: 0in;"><span></span></p> <p id="__paragraph__1246634953000" style="margin-bottom: 0in;"><span></span></p> <p id="__paragraph__1246634953000" style="margin-bottom: 0in;"><span style=""><br></span></p> <p style="margin-bottom: 0in;"> </p> <p style="margin-bottom: 0in;"><span></span></p> <p id="__paragraph__1246634957000" style="margin-bottom: 0in;"><span style=""><br></span></p> <p style="margin-bottom: 0in;"> I tried using M (macro call) in 'Dial' as follows :</p> <p style="margin-bottom: 0in;"><br></p> <p style="margin-bottom: 0in;">exten => 1008,n,Dial(SIP/1008||L(40000:10000:5000)M(macroSendCallStart^${UNIQUEID})) </p> <p style="margin-bottom: 0in;"><br></p> <p style="margin-bottom: 0in;"><br></p> <p style="margin-bottom: 0in;">Then the macro calls the AGI :</p> <p style="margin-bottom: 0in;"><br></p> <p style="margin-bottom: 0in;">[macro-macroSendCallStart]<br><br>exten => s,1,Verbose(macro-macroSendCallStart)<br>exten => s,n,Verbose(UNIQUEID ${UNIQUEID} )<br>exten => s,n,Verbose(ARG1 ${ARG1} )<br>exten => s,n,AGI(myAGI.agi,2,${ARG1},${CALLERID(num)},001) <br><br></p> <p style="margin-bottom: 0in;"><br></p> <p style="margin-bottom: 0in;">The problem is that the macro is 'forked' (new UNIQUEID) and when it ends goes to _h_ extesion triggering unwanted actions..</p> <p style="margin-bottom: 0in;"><span></span></p> <p id="__paragraph__1246635018000" style="margin-bottom: 0in;"><span></span></p> <p id="__paragraph__1246635018000" style="margin-bottom: 0in;"><span style=""><br></span></p> <p style="margin-bottom: 0in;"> </p> <p style="margin-bottom: 0in;"><br></p> <p style="margin-bottom: 0in;"> Any idea about how to avoid going to _h_ extension when a macro ends?</p> <p style="margin-bottom: 0in;"> Any other idea about how to trigger an AGI call when B number answers?</p> <p style="margin-bottom: 0in;"><br></p> <p style="margin-bottom: 0in;"> </p> <p style="margin-bottom: 0in;">Regards,</p> <p style="margin-bottom: 0in;"><br></p> <p style="margin-bottom: 0in;">Sel</p> <p style="margin-bottom: 0in;"><br></p> <p style="font-family: Verdana;"><br><br></p> <div> <p style="font-family: Verdana;"></p> <p></p> <p></p> </div> <p></p> </div></blockquote><p></p><p> </p><br><div id="editor_signature"><p style="font-family: Verdana;" size="2"></p><p></p><p></p></div><p></p></body></html>