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. On 12 September 2010 20:53, Nigel Kent <ktngl@yahoo.co.uk> wrote:
I have a event socket listener that catches CHANNEL_HANGUP_COMPLETE events and I want to verify the call leg details
1. Did the call end in aleg or bleg
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. How to interpret the value probably depends on whether it's on the A or B leg.
2. What was the call durations in each of the legs
Check variable_duration http://wiki.freeswitch.org/wiki/Event_list#CHANNEL_HANGUP_COMPLETE 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).
I am not sure if I am applying the terminology of call legs in the proper way but what I mean by aleg is that the incoming call was not bridged and bleg after being bridged
That's the correct terminology. :) -Steve
_______________________________________________ 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