Properly handle non-transmission of channel identifier
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@98 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This commit is contained in:
parent
baefdcb18d
commit
76955b74c3
11
q931.c
11
q931.c
@ -360,8 +360,6 @@ static int receive_channel_id(struct pri *pri, q931_call *call, int msgtype, q93
|
|||||||
static int transmit_channel_id(struct pri *pri, q931_call *call, int msgtype, q931_ie *ie, int len)
|
static int transmit_channel_id(struct pri *pri, q931_call *call, int msgtype, q931_ie *ie, int len)
|
||||||
{
|
{
|
||||||
int pos=0;
|
int pos=0;
|
||||||
if (!call->channelno)
|
|
||||||
return 0;
|
|
||||||
/* Start with standard stuff */
|
/* Start with standard stuff */
|
||||||
ie->data[pos] = 0xa1;
|
ie->data[pos] = 0xa1;
|
||||||
/* Add exclusive flag if necessary */
|
/* Add exclusive flag if necessary */
|
||||||
@ -1569,16 +1567,15 @@ static int restart_ack(struct pri *pri, q931_call *c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ALERTING_NO_PROGRESS
|
#ifdef ALERTING_NO_PROGRESS
|
||||||
static int call_progress_ies[] = { Q931_CHANNEL_IDENT, -1 };
|
static int call_progress_ies[] = { -1 };
|
||||||
#else
|
#else
|
||||||
static int call_progress_ies[] = { Q931_CHANNEL_IDENT, Q931_PROGRESS_INDICATOR, -1 };
|
static int call_progress_ies[] = { Q931_PROGRESS_INDICATOR, -1 };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int q931_call_progress(struct pri *pri, q931_call *c, int channel, int info)
|
int q931_call_progress(struct pri *pri, q931_call *c, int channel, int info)
|
||||||
{
|
{
|
||||||
if (!c->proc)
|
if (!c->proc)
|
||||||
q931_call_proceeding(pri, c, channel, 0);
|
q931_call_proceeding(pri, c, channel, 0);
|
||||||
c->channelno = 0;
|
|
||||||
c->ourcallstate = Q931_CALL_STATE_INCOMING_CALL_PROCEEDING;
|
c->ourcallstate = Q931_CALL_STATE_INCOMING_CALL_PROCEEDING;
|
||||||
c->peercallstate = Q931_CALL_STATE_OUTGOING_CALL_PROCEEDING;
|
c->peercallstate = Q931_CALL_STATE_OUTGOING_CALL_PROCEEDING;
|
||||||
if (info) {
|
if (info) {
|
||||||
@ -1617,9 +1614,9 @@ int q931_call_proceeding(struct pri *pri, q931_call *c, int channel, int info)
|
|||||||
return send_message(pri, c, Q931_CALL_PROCEEDING, call_proceeding_ies);
|
return send_message(pri, c, Q931_CALL_PROCEEDING, call_proceeding_ies);
|
||||||
}
|
}
|
||||||
#ifndef ALERTING_NO_PROGRESS
|
#ifndef ALERTING_NO_PROGRESS
|
||||||
static int alerting_ies[] = { Q931_CHANNEL_IDENT, Q931_PROGRESS_INDICATOR, -1 };
|
static int alerting_ies[] = { Q931_PROGRESS_INDICATOR, -1 };
|
||||||
#else
|
#else
|
||||||
static int alerting_ies[] = { Q931_CHANNEL_IDENT, -1 };
|
static int alerting_ies[] = { -1 };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int q931_alerting(struct pri *pri, q931_call *c, int channel, int info)
|
int q931_alerting(struct pri *pri, q931_call *c, int channel, int info)
|
||||||
|
Loading…
Reference in New Issue
Block a user