<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div>"if you call somewhere that uses early media, the originate will end<br>setting originate_disposition to SUCCESS meaning that a live channel<br>was produced. Now the bridge will begin between the A and B leg."</div><div><br></div><div>Does that mean it is safe to assume when "originate_disposition" is SUCCESS, that the call has been answered if I set the following:<br></div><div><br></div><div>{ignore_early_media=false}</div><div>{bridge_early_media=true}</div><div><br></div><div><br></div><div><br></div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><font face="Arial" size="2"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> Anthony Minessale
<anthony.minessale@gmail.com><br><b><span style="font-weight: bold;">To:</span></b> FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org><br><b><span style="font-weight: bold;">Sent:</span></b> Tuesday, August 16, 2011 10:54 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [Freeswitch-users] ORIGINATE_DISPOSITION<br></font><br>The originate disposition of A leg will always have the last known status from B<br><br>originate, by default, returns when:<br><br>1) media is established on a specific outgoing leg, answered or not<br>2) all outgoing legs are terminated.<br><br>if you call somewhere that uses early media, the originate will end<br>setting originate_disposition to SUCCESS meaning that a live channel<br>was produced. Now the bridge will begin between the A and B leg.<br><br>When the bridge ends if the B leg is hungup, its cause will be stored<br>in "bridge_hangup_cause"<br><br>if you want to keep the
originate from ending when early media is<br>established you can add {ignore_early_media=true} or<br>{bridge_early_media=true} prepended to your dial string and the<br>originate will never return untill all outbound legs are either hungup<br>or one is answered.<br><br><br>You should take some time to expand your mind to the different<br>paradigm in FreeSWITCH where you may have as many as 10 outbound legs<br>at once in a forked-dial situation and some of what you think is<br>simple and obvious will quickly dissolve.<br><br>Another thing you can do is set the variable "failed_xml_cdr_prefix"<br>on the A leg.<br>This prefix will be mixed with an incrementing variable for each<br>outbound call leg and in the case of a failure the entire XML cdr will<br>be set into a var on A leg.<br><br>for instance if you set failed_xml_cdr_prefix=foo you would get foo_1<br>foo_2 etc depending on the number of outbound call legs.<br><br>Additionally you can set
copy_xml_cdr on the A leg and when the bridge<br>ends you will get a complete CDR for B in the "b_leg_cdr" variable on<br>A<br><br>Finally you should really go with the flow of how FreeSWITCH is<br>engineered and try to keep your accounting logic in a separate place<br>and monitor the XML-CDR, CDR-CSV or event_socket +<br>CHANNEL_HANGUP_COMPLETE events to process this information. There is<br>much more to a call and what happens when it's transferred etc than<br>what you can get in a single monolithic perspective of inside the<br>channel. Plus it's conter intuitive to put routing, application and<br>accounting logic in the same place.<br><br><br><br>On Tue, Aug 16, 2011 at 12:26 PM, Sam <<a ymailto="mailto:lakersman2006@yahoo.com" href="mailto:lakersman2006@yahoo.com">lakersman2006@yahoo.com</a>> wrote:<br>> Dmitry,<br>> Yes, I agree. For an novice like me it was extremely confusing and<br>> frustrating that I could not get
the proper B leg disposition when A leg is<br>> answered by FS itself.<br>> I hope there can be some methods or functions that will allow us to get the<br>> proper B Leg disposition.<br>> ________________________________<br>> From: Dmitry Sytchev <<a ymailto="mailto:kbdfck@gmail.com" href="mailto:kbdfck@gmail.com">kbdfck@gmail.com</a>><br>> To: FreeSWITCH Users Help <<a ymailto="mailto:freeswitch-users@lists.freeswitch.org" href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>><br>> Sent: Tuesday, August 16, 2011 2:30 AM<br>> Subject: Re: [Freeswitch-users] ORIGINATE_DISPOSITION<br>><br>> Seems we need to clear things about B-leg disposition in wiki.<br>> AFAIK there is no method to get correct disposition from B leg without<br>> analyzing events in case when A-leg was answered by FS itself.<br>> If A leg was not answered, we can use A-leg disposition for
call<br>> disposition.<br>><br>> 2011/8/16 Michael Collins <<a ymailto="mailto:msc@freeswitch.org" href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>><br>><br>><br>> On Mon, Aug 15, 2011 at 5:05 PM, Sam <<a ymailto="mailto:lakersman2006@yahoo.com" href="mailto:lakersman2006@yahoo.com">lakersman2006@yahoo.com</a>> wrote:<br>><br>> I am using perl's $session->get_variable("originate_disposition");<br>><br>> Are you looking at the b-leg's session?<br>><br>><br>> Also, how come the "hangup_time" shows zero on answered calls?<br>><br>> Because hangup_time refers to the point in time at which the call was hung<br>> up. Since you are in the middle of a call (using the $session object) you<br>> will never see the hangup_time because the object ceases to exist once the<br>> call leg is disconnected.<br>> I get the impression that you may be using the wrong tool for this<br>>
particular job, but I'm not sure without seeing it. If you don't mind<br>> dropping it on pastebin we'll have a look and give you some suggestions.<br>> -MC<br>><br>> ________________________________<br>> From: Michael Collins <<a ymailto="mailto:msc@freeswitch.org" href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>><br>> To: FreeSWITCH Users Help <<a ymailto="mailto:freeswitch-users@lists.freeswitch.org" href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>><br>> Sent: Monday, August 15, 2011 4:58 PM<br>> Subject: Re: [Freeswitch-users] ORIGINATE_DISPOSITION<br>><br>> And how are you checking the variable? Do you have an event socket open or<br>> ... ?<br>> -MC<br>><br>> On Mon, Aug 15, 2011 at 4:57 PM, Sam <<a ymailto="mailto:lakersman2006@yahoo.com" href="mailto:lakersman2006@yahoo.com">lakersman2006@yahoo.com</a>> wrote:<br>><br>> It is
being generated with a bridge.<br>><br>> ________________________________<br>> From: Michael Collins <<a ymailto="mailto:msc@freeswitch.org" href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>><br>> To: FreeSWITCH Users Help <<a ymailto="mailto:freeswitch-users@lists.freeswitch.org" href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>><br>> Sent: Monday, August 15, 2011 4:54 PM<br>> Subject: Re: [Freeswitch-users] ORIGINATE_DISPOSITION<br>><br>> And how is it being generated? WIth a bridge or originate or ... ?<br>> -MC<br>><br>> On Mon, Aug 15, 2011 at 4:49 PM, Sam <<a ymailto="mailto:lakersman2006@yahoo.com" href="mailto:lakersman2006@yahoo.com">lakersman2006@yahoo.com</a>> wrote:<br>><br>> I want to know the B-leg status of the call.<br>><br>> ________________________________<br>> From: Michael Collins <<a
ymailto="mailto:msc@freeswitch.org" href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>><br>> To: FreeSWITCH Users Help <<a ymailto="mailto:freeswitch-users@lists.freeswitch.org" href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>><br>> Sent: Monday, August 15, 2011 4:31 PM<br>> Subject: Re: [Freeswitch-users] ORIGINATE_DISPOSITION<br>><br>> I think you may be wanting "endpoint_disposition" depending on exactly what<br>> you're looking at.<br>> -MC<br>><br>> On Mon, Aug 15, 2011 at 3:35 PM, Sam <<a ymailto="mailto:lakersman2006@yahoo.com" href="mailto:lakersman2006@yahoo.com">lakersman2006@yahoo.com</a>> wrote:<br>><br>> For the ORIGINATE_DISPOSITION channel variable, does "SUCCESS" mean the call<br>> was ANSWERED?<br>><br>><br>> FreeSWITCH-users mailing list<br>> <a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org"
href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>><br>><br>><br>><br>> FreeSWITCH-users mailing list<br>> <a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>> UNSUBSCRIBE:<a
href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>><br>><br>><br>><br>> FreeSWITCH-users mailing list<br>> <a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>><br>><br>><br>><br>> FreeSWITCH-users mailing
list<br>> <a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>><br>><br>><br>><br>> FreeSWITCH-users mailing list<br>> <a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>><br>><br>><br>><br>> FreeSWITCH-users mailing list<br>> <a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>> <a href="http://www.freeswitch.org"
target="_blank">http://www.freeswitch.org</a><br>><br>><br>><br>><br>> FreeSWITCH-users mailing list<br>> <a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>><br>><br>><br>><br>> FreeSWITCH-users mailing list<br>> <a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>> <a
href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>><br>><br>><br>><br>> --<br>> Best regards,<br>><br>> Dmitry Sytchev,<br>> IT Engineer<br>><br>><br>> FreeSWITCH-users mailing list<br>> <a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>> UNSUBSCRIBE:<a
href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>><br>><br>><br>><br>> FreeSWITCH-users mailing list<br>> <a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>><br>><br><br><br><br>-- <br>Anthony Minessale
II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>Twitter: <a href="http://twitter.com/FreeSWITCH_wire" target="_blank">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: anthm<br>MSN:<a ymailto="mailto:anthony_minessale@hotmail.com" href="mailto:anthony_minessale@hotmail.com">anthony_minessale@hotmail.com</a><br>GTALK/JABBER/PAYPAL:<a ymailto="mailto:anthony.minessale@gmail.com" href="mailto:anthony.minessale@gmail.com">anthony.minessale@gmail.com</a><br>IRC: irc.freenode.net #freeswitch<br><br>FreeSWITCH Developer Conference<br>sip:<a ymailto="mailto:888@conference.freeswitch.org" href="mailto:888@conference.freeswitch.org">888@conference.freeswitch.org</a><br>googletalk:conf+<a ymailto="mailto:888@conference.freeswitch.org"
href="mailto:888@conference.freeswitch.org">888@conference.freeswitch.org</a><br>pstn:+19193869900<br><br><br>FreeSWITCH-users mailing list<br><a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br><br><br></div></div></div></body></html>