--
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 adhearsion+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
This is indeed the intended behaviour. Can you confirm that you would like "first to confirm" semantics? How would you like to deal with legs that are answered and half way through confirmation when another leg wins the race?
I've created a feature request for this (https://github.com/adhearsion/adhearsion/issues/305).I agree with Ben Klang, the current behaviour was certainly the more surprising one for me, so much so that I had to double-check to make sure I wasn't using Adhearsion wrong.I also liked the idea of the callback to allow us to clean up the call before hanging up on anyone else in the process of confirming.The last question to answer is do we try to keep both behaviours and switch between them with an option or just move to the new one? And if we do keep both, what becomes the default?
I agree, this could be useful in applications.What happens if two dialed calls are in the confirmation controller at the same time and one finishes first?
Srushti: confirm_metadata is shared, yes. This should probably be documented better. If you want to avoid concurrent mutation issues, you should pass something immutable :)
Srushti: confirm_metadata is shared, yes. This should probably be documented better. If you want to avoid concurrent mutation issues, you should pass something immutable :)The reason that occurred to me was I'm sort of cheating by setting some values on an object that represents the phone call from our perspective in the metadata to return back to the original controller. We want to know who ended up confirming the call and at what precise moment the call started (the moment when the two calls were connected), which we then subtract from the moment when the call ends (the line after the #dial call).I know these are multi-threaded but I was counting on only one being active at a given moment. In my own situation the update to the object I'm making will still only happen on one thread, but I'm more aware of what I'm probably doing wrong with multiple threads sharing my object now.
With that in mind, is there a more accepted way to pass arbitrary metadata back, and more specifically get the call duration (between joining till one of them hangs up) and which number actually got connected to from the CallResult object. The documentation doesn't seem very clear on this or at least I'm not reading it clearly.
Can we make a list of things we think would be useful?
As for the case of handling mid-confirmation disconnection - does anyone have any suggestions about a nice API for this?
The problem with this it breaks encapsulation a bit. Our original controller needs to know what method in the ConfirmationController needs to be called.dial_with_confirm numbers, ConfirmationController, confirm_metadata: {}, confirmation_termination_callback: :cleanup_after_alternate_confirmation