I have tested the following case:
1) Call A is being answered by Adhearsion.
2) A dial is made with two destinations (B and C).
3) B picks up the phone.
4) A and B are being bridged.
5) B hangs up the call.
6) A is being hanged up too ! Which is not the expected behaviour, since the controller has many more actions to do with the call before hanging up.
Here are the Adhearsion and Freeswitch logs, plus the outbound gateway config: https://gist.github.com/krakatoa/daf1051a085b3512ee56
I have tested by specifying a hangup_after_bridge=false and park_after_bridge=true on the OutboundCall, but no success anyway.
Just ping me if you need more accurate logging or explanation of the case. Thanks a lot.
Can you please set those channel vars on the inbound call in the FS dialplan right before executing the park application?
I set both park_after_bridge=true and hangup_after_bridge=false, the logs are here: https://gist.github.com/krakatoa/9fed421c8516a1eac395
I'm not sure of what is really happening since I'm not used to reading the FS logs, but it seems the A call is not being hanged up, although it falls into a limbo: it is answered again but not parked, so the controller doesn't continue nor handle it.
(FreeSWITCH Version 1.3.14b+git~20130304T172819Z~8bd098d59e (git 8bd098d 2013-03-04 17:28:19Z))
With park_after_bridge enabled, I could fix this by adding this line:
throw :halt if event[:unique_id] != id
right before this one.
I came up with that is because I do not think we need to hang up a call when the event is on another call. (does this event handling of another call happens only with bridged calls ?),
Completely sure, what I'm not sure if this brings us another issue (I couldn't run the specs yet). Do you have any clue on why the event is reaching the other call actor ?
Aha, we're dispatching the event here. I need to come up with a better filter here.
[BUGFIX] Fix adhearsion/adhearsion#270
On FreeSWITCH, only events relating to bridge start/end should be delivered to bridged calls
Please try again with Punchblock's develop branch. Let me know if this needs reopening.
Awesome Ben, it works perfect. Thank you.