<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Thanks that's helpfull informatiom. I am going do some practical test now<br><br>--- On <b>Wed, 15/9/10, Steven Ayre <i><steveayre@gmail.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Steven Ayre <steveayre@gmail.com><br>Subject: Re: [Freeswitch-users] Getting call leg details<br>To: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org><br>Date: Wednesday, 15 September, 2010, 17:04<br><br><div id="yiv2012498607"><br><br><div class="yiv2012498607gmail_quote">On 15 September 2010 16:10, Nigel Kent <span dir="ltr"><<a rel="nofollow" ymailto="mailto:ktngl@yahoo.co.uk" target="_blank" href="/mc/compose?to=ktngl@yahoo.co.uk">ktngl@yahoo.co.uk</a>></span> wrote:<br><blockquote class="yiv2012498607gmail_quote" style="border-left: 1px solid rgb(204,
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; -x-system-font: none;" valign="top">I think I am undertaning better now what you said.<div><br></div><div>For a call( connected between both ends) that gets disconnected there will be seperate hang up events genereated, one from each leg and each leg has its own<span style="font-family: arial,helvetica,clean,sans-serif; border-collapse: collapse; line-height: 15px;"> UUID </span></div>
</td></tr></tbody></table></blockquote><div><br>Yes, that's correct. Each leg is a separate channel which are really separate calls from the caller to freeswitch, and from freeswitch to the caller. Each has it's own UUID and events. You join the two together by bridging them, at which point their signalling and media are joined together.<br>
<br></div><blockquote class="yiv2012498607gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; -x-system-font: none;" valign="top">
<div><br></div><div>In that case I understand the incoming is assigned a <span style="font-family: arial,helvetica,clean,sans-serif; border-collapse: collapse; line-height: 15px;">UUID as soon as it comes in.</span></div>
</td></tr></tbody></table></blockquote><div><br>Yes. The UUID is assigned as soon as the channel is created.<br><br></div><blockquote class="yiv2012498607gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; -x-system-font: none;" valign="top"><div><br></div><div>In regards to my original needs in identifity the
legs, I am thinking I could set a channel variable to indicate the leg. This could be done as soon as the call is anwsered for the a leg.</div></td></tr></tbody></table></blockquote><div><br>This already exists. There is a direction variable which will be set to inbound on the A-leg and outbound on the B-leg. AFAIK it exists as soon as the channel is created.<br>
</div><blockquote class="yiv2012498607gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; -x-system-font: none;" valign="top">
<div><br></div><div>So now I am trying to work out how to access the b leg variables?</div></td></tr></tbody></table></blockquote><div><br>The variables will be in the CHANNEL_HANGUP_COMPLETE event for the B-Leg. If you want variable_sip_hangup_disposition you only need it for one of the legs:<br>
<br>A-Leg:<br>
cancel : caller hung up before the call was answered<br>recv_bye : was answered, caller (aleg) hung up<br>send_bye : was answered, callee (bleg) hung up<br><br>B-Leg (bye direction swapped compared to aleg)<br>
cancel : caller hung up before the call was answered<br>recv_bye : was answered, callee (aleg) hung up<br>send_bye : was answered, caller (bleg) hung up<br><br>-Steve <br><br></div><blockquote class="yiv2012498607gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; -x-system-font: none;" valign="top"><div><div class="yiv2012498607im"> <br><br>--- On <b>Wed, 15/9/10, Steven Ayre <i><<a rel="nofollow" ymailto="mailto:steveayre@gmail.com" target="_blank" href="/mc/compose?to=steveayre@gmail.com">steveayre@gmail.com</a>></i></b> wrote:<br>
</div><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><div class="yiv2012498607im"><br>From: Steven Ayre <<a rel="nofollow" ymailto="mailto:steveayre@gmail.com" target="_blank" href="/mc/compose?to=steveayre@gmail.com">steveayre@gmail.com</a>><br>
Subject: Re: [Freeswitch-users] Getting call leg details<br>To: "FreeSWITCH Users Help" <<a rel="nofollow" ymailto="mailto:freeswitch-users@lists.freeswitch.org" target="_blank" href="/mc/compose?to=freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>><br>
</div>Date: Wednesday, 15 September, 2010, 12:24<div><div></div><div class="yiv2012498607h5"><br><br><div><br><br><div>On 15 September 2010 10:05, Nigel Kent <span dir="ltr"><<a rel="nofollow" target="_blank" href="http://mc/compose?to=ktngl@yahoo.co.uk">ktngl@yahoo.co.uk</a>></span>
wrote:<br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; -x-system-font: none;" valign="top"><div><br></div><div>Thanks for the info, I have a few further questions</div><div><br></div><div>Is it on the execution of the bridge that generates the CHANNEL_HANGUP_COMPLETE for the first leg.</div>
</td></tr></tbody></table></blockquote><div><br>No, it's after the channel hangs up (CHANNEL_HANGUP being sent when it starts to hang up).<br>If the caller on the A-leg initiates the hangup, then the B-Leg will hangup when the A-Leg hangs up.<br>
If the callee on the B-leg initiates the hangup, then the A-Leg will either hangup (if hangup_on_bridge=true) or return to the dialplan and hangup when it has no more applications to run.<br><br>If you want to know when the bridge starts/finishes look for CHANNEL_BRIDGE and CHANNEL_UNBRIDGE.<br>
<br></div><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; -x-system-font: none;" valign="top">
<div><br></div><div>If so how does it carry the call on to the second leg because I thought that CHANNEL_HANGUP_COMPLETE is sent after a call disconnected.</div></td></tr></tbody></table></blockquote><div><br>It is sent then. Not sure I understand what you mean by 'carry the call on'?<br>
<br>-Steve<br><br><br> </div><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; -x-system-font: none;" valign="top">
<div><br></div><div><br></div><div><br></div>--- On <b>Sun, 12/9/10, Steven Ayre <i><<a rel="nofollow" target="_blank" href="http://mc/compose?to=steveayre@gmail.com">steveayre@gmail.com</a>></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">
<br>From: Steven Ayre <<a rel="nofollow" target="_blank" href="http://mc/compose?to=steveayre@gmail.com">steveayre@gmail.com</a>><br>Subject: Re: [Freeswitch-users] Getting call leg details<br>To: "FreeSWITCH Users Help" <<a rel="nofollow" target="_blank" href="http://mc/compose?to=freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>><br>
Date: Sunday, 12 September, 2010, 21:43<div><div></div><div><br><br><div>Both the A-Leg
and B-Leg will generate a CHANNEL_HANGUP_COMPLETE event. Each will have a different UUID so you'll only get both events if you're watching both/all UUIDs.<br><br><div>On 12 September 2010 20:53, Nigel Kent <span dir="ltr"><<a rel="nofollow" target="_blank" href="http://mc/compose?to=ktngl@yahoo.co.uk">ktngl@yahoo.co.uk</a>></span> wrote:<br>
<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; -x-system-font: none;" valign="top">
I have a event socket listener that catches CHANNEL_HANGUP_COMPLETE events and I want to verify the call leg details<br><br>1. Did the call end in aleg or bleg<br></td></tr></tbody></table></blockquote><div><br>Check variable_sip_hangup_disposition. Values will be recv_bye, send_bye or cancel. Not sure how to do it if you have something other than sofia on either leg.<br>
How to interpret the value probably depends on whether it's on the A or B leg.<br> <br></div><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; -x-system-font: none;" valign="top"><br>2. What was the call durations in each of the legs<br></td></tr></tbody></table></blockquote><div><br>Check variable_duration<br>
<br><a rel="nofollow" target="_blank" href="http://wiki.freeswitch.org/wiki/Event_list#CHANNEL_HANGUP_COMPLETE">http://wiki.freeswitch.org/wiki/Event_list#CHANNEL_HANGUP_COMPLETE</a> contains an example of the event which will be generated, and includes many of the channel variables, including several useful timestamp and durations. For example there are timestamps for the call starting, ringing (progress), answered, and hangup, and a billsec variable as well as the duration (which should be the same in almost all cases).<br>
</div><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; -x-system-font: none;" valign="top">
<br>I am not sure if I am applying the terminology of call legs in the proper way but<br>what I mean by aleg is that the incoming call was not bridged and bleg after being bridged<br></td></tr></tbody></table><br></blockquote>
<div><br>That's the correct terminology. :)<br><br>-Steve<br> </div><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a rel="nofollow" target="_blank" href="http://mc/compose?to=FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a rel="nofollow" target="_blank" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a rel="nofollow" target="_blank" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a rel="nofollow" target="_blank" href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>
</div><br></div></div>-----Inline Attachment Follows-----<div><br><br><div>_______________________________________________<br>FreeSWITCH-users mailing list<br><a rel="nofollow" target="_blank" href="http://mc/compose?to=FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a rel="nofollow" target="_blank" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:<a rel="nofollow" target="_blank" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a rel="nofollow" target="_blank" href="http://www.freeswitch.org">http://www.freeswitch.org</a><br></div></div></blockquote></td></tr></tbody></table><br>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a rel="nofollow" target="_blank" href="http://mc/compose?to=FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a rel="nofollow" target="_blank" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a rel="nofollow" target="_blank" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a rel="nofollow" target="_blank" href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>
</div><br>-----Inline Attachment Follows-----<br><br><div>_______________________________________________<br>FreeSWITCH-users mailing list<br><a rel="nofollow" target="_blank" href="http://mc/compose?to=FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a rel="nofollow" target="_blank" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:<a rel="nofollow" target="_blank" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a rel="nofollow" target="_blank" href="http://www.freeswitch.org">http://www.freeswitch.org</a><br></div></div></div></blockquote></div></td></tr></tbody></table><br>
<br>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a rel="nofollow" ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank" href="/mc/compose?to=FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a rel="nofollow" target="_blank" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a rel="nofollow" target="_blank" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a rel="nofollow" target="_blank" href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>
<br></blockquote></div><br>
</div><br>-----Inline Attachment Follows-----<br><br><div class="plainMail">_______________________________________________<br>FreeSWITCH-users mailing list<br><a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" href="/mc/compose?to=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></div></blockquote></td></tr></table><br>