Get who unjoined

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Get who unjoined

Lloyd Hughes
Hi,

When two calls unjoin from each other because one of them hungup, the on_unjoined event is fired before the on_end event of the call which hungup. This makes sense, but unfortunately doesn't completely suit my project. 

When Leg A and Leg B are unjoined, I would like to know the reason for the unjoin (did Leg A or Leg B hangup, or was the unjoin request via a method). I tried to do this by running LegA.active? and LegB.active? in the on_unjoined handler but both return true. I assume this is because the calls stay active for a few seconds after the hangup request. Is there a way to do this easily? Or what method would you suggest for getting this information?

Thanks

Lloyd

--
You received this message because you are subscribed to the Google Groups "Adhearsion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Get who unjoined

Ben Langfeld-2
This is actually quite tricky. There's an issue for this at https://github.com/adhearsion/adhearsion/issues/330. Please provide some input there if that's not sufficient.


On 1 July 2014 07:11, Lloyd <[hidden email]> wrote:
Hi,

When two calls unjoin from each other because one of them hungup, the on_unjoined event is fired before the on_end event of the call which hungup. This makes sense, but unfortunately doesn't completely suit my project. 

When Leg A and Leg B are unjoined, I would like to know the reason for the unjoin (did Leg A or Leg B hangup, or was the unjoin request via a method). I tried to do this by running LegA.active? and LegB.active? in the on_unjoined handler but both return true. I assume this is because the calls stay active for a few seconds after the hangup request. Is there a way to do this easily? Or what method would you suggest for getting this information?

Thanks

Lloyd

--
You received this message because you are subscribed to the Google Groups "Adhearsion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Adhearsion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.