[asterisk-users] Trigger an action when B number answers the call

Danny Nicholas danny at debsinc.com
Fri Jul 3 10:43:30 CDT 2009


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 


More information about the asterisk-users mailing list