Simple yet complicated issue I've been working on for about 48 hours. I could really use some assistance....

1. I'm bridging calls via httapi and that is working fine.

<execute action="$action" application="bridge" data="sofia/gateway/voipms/2145551212"></execute>


2. I want to be notified at my URL via CURL when, A: The call starts ringing and B: The call is answered. I'm using this code for that: 

<!-- Get a CURL post once call starts ringing (media begins) -->
<!-- <execute application=\"export\" data=\"nolocal:execute_on_media=curl http://myurl.com/test3.php post event=RingRing&amp;\${uuid}&amp;state=\${state}&direction=\${direction}\"></execute>  -->

<!-- Get a CURL post once leg B answers -->
<execute application=\"export\" data=\"nolocal:execute_on_answer=curl http://myurl.com/test3.php post event=RingRing_Answer&amp;\${uuid}&amp;state=\${state}&direction=\${direction}\"></execute>


The problem comes because it's a bridge, as far as FreeSWITCH is concerned once it's connected to the gateway and the gateway answers, the "execute_on_answer" should be triggered, but i need it to execute when the party actually answers the phone, not when the gateway "answers".


There must be a simple way around this, open to suggestions, thanks!