<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.&nbsp; 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
 &lt;anthony.minessale@gmail.com&gt;<br><b><span style="font-weight: bold;">To:</span></b> FreeSWITCH Users Help &lt;freeswitch-users@lists.freeswitch.org&gt;<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.&nbsp; 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.&nbsp; 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.&nbsp; 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 &lt;<a ymailto="mailto:lakersman2006@yahoo.com" href="mailto:lakersman2006@yahoo.com">lakersman2006@yahoo.com</a>&gt; wrote:<br>&gt; Dmitry,<br>&gt; Yes, I agree. For an novice like me it was extremely confusing and<br>&gt; frustrating that I could not get
 the proper B leg disposition when A leg is<br>&gt; answered by FS itself.<br>&gt; I hope there can be some methods or functions that will allow us to get the<br>&gt; proper B Leg disposition.<br>&gt; ________________________________<br>&gt; From: Dmitry Sytchev &lt;<a ymailto="mailto:kbdfck@gmail.com" href="mailto:kbdfck@gmail.com">kbdfck@gmail.com</a>&gt;<br>&gt; To: FreeSWITCH Users Help &lt;<a ymailto="mailto:freeswitch-users@lists.freeswitch.org" href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>&gt;<br>&gt; Sent: Tuesday, August 16, 2011 2:30 AM<br>&gt; Subject: Re: [Freeswitch-users] ORIGINATE_DISPOSITION<br>&gt;<br>&gt; Seems we need to clear things about B-leg disposition in wiki.<br>&gt; AFAIK there is no method to get correct disposition from B leg without<br>&gt; analyzing events in case when A-leg was answered by FS itself.<br>&gt; If A leg was not answered, we can use A-leg disposition for
 call<br>&gt; disposition.<br>&gt;<br>&gt; 2011/8/16 Michael Collins &lt;<a ymailto="mailto:msc@freeswitch.org" href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>&gt;<br>&gt;<br>&gt;<br>&gt; On Mon, Aug 15, 2011 at 5:05 PM, Sam &lt;<a ymailto="mailto:lakersman2006@yahoo.com" href="mailto:lakersman2006@yahoo.com">lakersman2006@yahoo.com</a>&gt; wrote:<br>&gt;<br>&gt; I am using perl's $session-&gt;get_variable("originate_disposition");<br>&gt;<br>&gt; Are you looking at the b-leg's session?<br>&gt;<br>&gt;<br>&gt; Also, how come the "hangup_time" shows zero on answered calls?<br>&gt;<br>&gt; Because hangup_time refers to the point in time at which the call was hung<br>&gt; up. Since you are in the middle of a call (using the $session object) you<br>&gt; will never see the hangup_time because the object ceases to exist once the<br>&gt; call leg is disconnected.<br>&gt; I get the impression that you may be using the wrong tool for this<br>&gt;
 particular job, but I'm not sure without seeing it. If you don't mind<br>&gt; dropping it on pastebin we'll have a look and give you some suggestions.<br>&gt; -MC<br>&gt;<br>&gt; ________________________________<br>&gt; From: Michael Collins &lt;<a ymailto="mailto:msc@freeswitch.org" href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>&gt;<br>&gt; To: FreeSWITCH Users Help &lt;<a ymailto="mailto:freeswitch-users@lists.freeswitch.org" href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>&gt;<br>&gt; Sent: Monday, August 15, 2011 4:58 PM<br>&gt; Subject: Re: [Freeswitch-users] ORIGINATE_DISPOSITION<br>&gt;<br>&gt; And how are you checking the variable? Do you have an event socket open or<br>&gt; ... ?<br>&gt; -MC<br>&gt;<br>&gt; On Mon, Aug 15, 2011 at 4:57 PM, Sam &lt;<a ymailto="mailto:lakersman2006@yahoo.com" href="mailto:lakersman2006@yahoo.com">lakersman2006@yahoo.com</a>&gt; wrote:<br>&gt;<br>&gt; It is
 being generated with a bridge.<br>&gt;<br>&gt; ________________________________<br>&gt; From: Michael Collins &lt;<a ymailto="mailto:msc@freeswitch.org" href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>&gt;<br>&gt; To: FreeSWITCH Users Help &lt;<a ymailto="mailto:freeswitch-users@lists.freeswitch.org" href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>&gt;<br>&gt; Sent: Monday, August 15, 2011 4:54 PM<br>&gt; Subject: Re: [Freeswitch-users] ORIGINATE_DISPOSITION<br>&gt;<br>&gt; And how is it being generated? WIth a bridge or originate or ... ?<br>&gt; -MC<br>&gt;<br>&gt; On Mon, Aug 15, 2011 at 4:49 PM, Sam &lt;<a ymailto="mailto:lakersman2006@yahoo.com" href="mailto:lakersman2006@yahoo.com">lakersman2006@yahoo.com</a>&gt; wrote:<br>&gt;<br>&gt; I want to know the B-leg status of the call.<br>&gt;<br>&gt; ________________________________<br>&gt; From: Michael Collins &lt;<a
 ymailto="mailto:msc@freeswitch.org" href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>&gt;<br>&gt; To: FreeSWITCH Users Help &lt;<a ymailto="mailto:freeswitch-users@lists.freeswitch.org" href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>&gt;<br>&gt; Sent: Monday, August 15, 2011 4:31 PM<br>&gt; Subject: Re: [Freeswitch-users] ORIGINATE_DISPOSITION<br>&gt;<br>&gt; I think you may be wanting "endpoint_disposition" depending on exactly what<br>&gt; you're looking at.<br>&gt; -MC<br>&gt;<br>&gt; On Mon, Aug 15, 2011 at 3:35 PM, Sam &lt;<a ymailto="mailto:lakersman2006@yahoo.com" href="mailto:lakersman2006@yahoo.com">lakersman2006@yahoo.com</a>&gt; wrote:<br>&gt;<br>&gt; For the ORIGINATE_DISPOSITION channel variable, does "SUCCESS" mean the call<br>&gt; was ANSWERED?<br>&gt;<br>&gt;<br>&gt; FreeSWITCH-users mailing list<br>&gt; <a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org"
 href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; FreeSWITCH-users mailing list<br>&gt; <a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>&gt; UNSUBSCRIBE:<a
 href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; FreeSWITCH-users mailing list<br>&gt; <a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; FreeSWITCH-users mailing
 list<br>&gt; <a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; FreeSWITCH-users mailing list<br>&gt; <a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
 target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; FreeSWITCH-users mailing list<br>&gt; <a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>&gt; <a href="http://www.freeswitch.org"
 target="_blank">http://www.freeswitch.org</a><br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; FreeSWITCH-users mailing list<br>&gt; <a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; FreeSWITCH-users mailing list<br>&gt; <a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>&gt; <a
 href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; --<br>&gt; Best regards,<br>&gt;<br>&gt; Dmitry Sytchev,<br>&gt; IT Engineer<br>&gt;<br>&gt;<br>&gt; FreeSWITCH-users mailing list<br>&gt; <a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>&gt; UNSUBSCRIBE:<a
 href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; FreeSWITCH-users mailing list<br>&gt; <a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>&gt;<br>&gt;<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>