If inband audio is being provided with a disconnect message let the audio be heard before releasing the channel.

(closes issue #10552)
Reported by: paravoid
Patches:
      disconnect-audio.diff uploaded by paravoid (license 200)


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@528 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This commit is contained in:
Joshua Colp 2008-02-21 16:38:11 +00:00
parent 160be09f76
commit c93dfbae5f

6
q931.c
View File

@ -3716,6 +3716,12 @@ int q931_receive(struct pri *pri, q931_h *h, int len)
UPDATE_OURCALLSTATE(pri, c, Q931_CALL_STATE_DISCONNECT_INDICATION); UPDATE_OURCALLSTATE(pri, c, Q931_CALL_STATE_DISCONNECT_INDICATION);
c->peercallstate = Q931_CALL_STATE_DISCONNECT_REQUEST; c->peercallstate = Q931_CALL_STATE_DISCONNECT_REQUEST;
c->sendhangupack = 1; c->sendhangupack = 1;
/* wait for a RELEASE so that sufficient time has passed
for the inband audio to be heard */
if (c->progressmask & PRI_PROG_INBAND_AVAILABLE)
break;
/* Return such an event */ /* Return such an event */
pri->ev.e = PRI_EVENT_HANGUP_REQ; pri->ev.e = PRI_EVENT_HANGUP_REQ;
pri->ev.hangup.channel = c->channelno | (c->ds1no << 8) | (c->ds1explicit << 16); pri->ev.hangup.channel = c->channelno | (c->ds1no << 8) | (c->ds1explicit << 16);