selmak se
2009-Jul-03 15:30 UTC
[asterisk-users] 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;"><span></span></p><p
id="__paragraph__1246634935000" style=""> </p><p
style="margin-bottom: 0in;"><br> </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
size="2" style="font-family:
Verdana;"><br><br></p><div
id="editor_signature"><p style="font-family: Verdana;"
size="2"></p><p></p><p></p></div><p></p></body></html>
Danny Nicholas
2009-Jul-03 15:43 UTC
[asterisk-users] Trigger an action when B number answers the call
These may just be WAG's, but they are worth a try. Put exten =>
s,n,goto(wherever|s|1) at the end of the macro to make it go to the next
live place. As for starting the AGI when the caller answers, you can't
really do that; you either have to start the AGI before answer or run it as
a DeadAGI on hangup.
_____
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of selmak se
Sent: Friday, July 03, 2009 10:31 AM
To: asterisk-users at lists.digium.com
Subject: [asterisk-users] Trigger an action when B number answers the call
Hello,
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 )
I tried using M (macro call) in 'Dial' as follows :
exten =>
1008,n,Dial(SIP/1008||L(40000:10000:5000)M(macroSendCallStart^${UNIQUEID}))
Then the macro calls the AGI :
[macro-macroSendCallStart]
exten => s,1,Verbose(macro-macroSendCallStart)
exten => s,n,Verbose(UNIQUEID ${UNIQUEID} )
exten => s,n,Verbose(ARG1 ${ARG1} )
exten => s,n,AGI(myAGI.agi,2,${ARG1},${CALLERID(num)},001)
The problem is that the macro is 'forked' (new UNIQUEID) and when it
ends
goes to _h_ extesion triggering unwanted actions..
Any idea about how to avoid going to _h_ extension when a macro ends?
Any other idea about how to trigger an AGI call when B number answers?
Regards,
Sel
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20090703/90cd1153/attachment.htm
Philipp Kempgen
2009-Jul-03 15:54 UTC
[asterisk-users] Trigger an action when B number answers the call
selmak se schrieb:> >Plain text? http://lists.digium.com/pipermail/asterisk-users/2009-July/234274.html Philipp Kempgen -- AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied -> http://www.amooma.de Gesch?ftsf?hrer: Stefan Wintermeyer, Handelsregister: Neuwied B14998 Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de Videos of the AMOOCON VoIP conference 2009 -> http://www.amoocon.de --