Well, I think I was not very clear beacause of lack of informations about what I wanted to do.
So now, here is the scenario:

I have a big originate string that I send through a socket:

bgapi originate {var=value}[var=value...]sofia/route1/num|[var=value...]sofia/route2/num... '&bridge( {var=value...}[var=value...]sofia/route1/num|[var=value...]sofia/route2/num...)'

So, as you can see, I have pipe between the differents routes. Actually, if I set ignore_early_media to TRUE and if the first route (route1) fails, Freeswitch will go to the next route (route2) because it waits a state "answered" to continue. BUT, the A leg won't hear any ringtone.
On the contrary, if I set ignore_early_media to FALSE and if the first route (route1) fails, Freeswitch will NOT go to the next route (route2) because it considers that the call is successful with the state "ringing".

So what I need is that Freeswitch considers a call successful ONLY when it is "answered" and also that the A leg can hear a ringtone.

I apologize for the wrong way that I took since the beginning.

Thanks a lot

2011/7/11 Michael Collins <msc@freeswitch.org>


On Mon, Jul 11, 2011 at 5:08 AM, Mathieu Lautram <lautram.mathieu@gmail.com> wrote:
In fact, I want to know when the phone of B leg is effectively ringing. If I don't ignore early media, FreeSWITCH will consider the bridge successful even if the phone of B leg is not ringing. So I have to ignore early media to know that. But, if I set ignore_early_media to true, A leg will not hear any ringtone. 

In what scenarios are you dealing with "the bridge successful even if the phone of B leg is not ringing"? Until you identify those specifically there's not much we can do to assist you.

-MC


_______________________________________________
Join us at ClueCon 2011, Aug 9-11, Chicago
http://www.cluecon.com 877-7-4ACLUE

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org




--
Mathieu LAUTRAM
Application developer

BJT Partners - FRANCE
+33 1 79 75 99 60
+33 6 61 59 07 25