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-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of selmak se Sent: Friday, July 03, 2009 10:31 AM To: asterisk-users@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
_______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users