Google
  Web www.spinics.net

Re: Trigger an action when B number answers the call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


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@xxxxxxxxxxxxxxxx [mailto:asterisk-users-bounces@xxxxxxxxxxxxxxxx] On Behalf Of selmak se
Sent: Friday, July 03, 2009 10:31 AM
To: asterisk-users@xxxxxxxxxxxxxxxx
Subject: 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 --


To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[IP Phones]     [Open H.323]     [Gnu Gatekeeper]     [IETF Sipping]     [Freeswitch]     [Info Cyrus]     [ALSA User]     [Fedora Linux Users]     [DCCP]     [Gimp]     [100% Free Online Dating]     [Yosemite News]     [Yosemite Photos]     [Deep Creek Hot Springs]     [Yosemite Campsites]     [Building Telephony Systems with Asterisk]     [ISDN Cause Codes]


Add to Google Powered by Linux