[Freeswitch-users] 5 second delay when taking a phone off hold
Dave Horton
daveh at beachdognet.com
Wed Sep 14 21:19:47 MSD 2016
It turns out the bug (if it is one) is different than I thought. When handling the on-hold re-INVITE, I was attempting to play moh to the caller via a lua script that I had set a variable for initially. It turns out that script was trying to play a non-existent file. The SIP call itself was not affected, but then when I went off hold I encountered the 5-sec delay apparently because the state of channel for the leg was in a state due to the play failure (or the script failure, as the lua script itself exited ungracefully) such that the attempt to set the CF_BROADCAST flag to false failed.
Not sure if you consider this a bug or not.
Dave
On Sep 14, 2016, at 1:07 PM, Michael Jerris <mike at jerris.com> wrote:
Please test latest code first.
> On Sep 13, 2016, at 10:29 AM, Dave Horton <daveh at beachdognet.com> wrote:
>
> I have noticed that when I put a phone on hold, and then later take it off hold that there is a 5 second delay when Freeswitch handles the re-INVITE off-hold (no such delay going on hold).
>
> My app is a fairly simple bridging application, where call is placed from A to B through Freeswitch; the B leg goes on hold and then later attempts to go off hold.
>
> I have tracked the 5 second delay to this line of code in switch_core_media.c:
>
> if (b_channel) {
> if (switch_channel_test_flag(session->channel, CF_HOLD)) {
> switch_ivr_unhold(b_session);
> switch_channel_clear_flag(session->channel, CF_SUSPEND);
> switch_channel_clear_flag(session->channel, CF_HOLD);
> } else {
> switch_channel_stop_broadcast(b_channel);
> switch_channel_wait_for_flag(b_channel, CF_BROADCAST, SWITCH_FALSE, 5000, NULL); <== 5 second delay happens here
> }
> }
>
>
> Couple of other data points:
> 1. When I go on hold, the INVITE on hold that Freeswitch receives on one leg is not propagated out the associated leg, for whatever reason
> 2. I am using late negotiation of the SDP between the A and B legs.
> 3. I am running version 1.68
>
> Is this a bug and should I open a Jira? I can obviously provide traces but wanted to first know if this is a bug or some configuration issue
>
> Dave
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting at freeswitch.org
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list