q931.c: Update ALERTING_NO_PROGRESS conditional code.

The conditional is to only remove the Progress Indicator ie from being
added to select messages.

* Made so the ALERTING message can have the User-User ie if needed when
ALERTING_NO_PROGRESS is defined.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2335 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This commit is contained in:
Richard Mudgett 2016-02-09 21:46:26 +00:00
parent fc96191788
commit 6b2cc87b30

39
q931.c
View File

@ -5637,11 +5637,12 @@ int q931_notify(struct pri *ctrl, q931_call *c, int channel, int info)
return q931_notify_redirection(ctrl, c, info, NULL, NULL); return q931_notify_redirection(ctrl, c, info, NULL, NULL);
} }
#ifdef ALERTING_NO_PROGRESS static int call_progress_ies[] = {
static int call_progress_ies[] = { -1 }; #ifndef ALERTING_NO_PROGRESS
#else Q931_PROGRESS_INDICATOR,
static int call_progress_ies[] = { Q931_PROGRESS_INDICATOR, -1 };
#endif #endif
-1
};
int q931_call_progress(struct pri *ctrl, q931_call *c, int channel, int info) int q931_call_progress(struct pri *ctrl, q931_call *c, int channel, int info)
{ {
@ -5669,11 +5670,13 @@ int q931_call_progress(struct pri *ctrl, q931_call *c, int channel, int info)
return send_message(ctrl, c, Q931_PROGRESS, call_progress_ies); return send_message(ctrl, c, Q931_PROGRESS, call_progress_ies);
} }
#ifdef ALERTING_NO_PROGRESS static int call_progress_with_cause_ies[] = {
static int call_progress_with_cause_ies[] = { Q931_CAUSE, -1 }; Q931_CAUSE,
#else #ifndef ALERTING_NO_PROGRESS
static int call_progress_with_cause_ies[] = { Q931_CAUSE, Q931_PROGRESS_INDICATOR, -1 }; Q931_PROGRESS_INDICATOR,
#endif #endif
-1
};
int q931_call_progress_with_cause(struct pri *ctrl, q931_call *c, int channel, int info, int cause) int q931_call_progress_with_cause(struct pri *ctrl, q931_call *c, int channel, int info, int cause)
{ {
@ -5705,11 +5708,13 @@ int q931_call_progress_with_cause(struct pri *ctrl, q931_call *c, int channel, i
return send_message(ctrl, c, Q931_PROGRESS, call_progress_with_cause_ies); return send_message(ctrl, c, Q931_PROGRESS, call_progress_with_cause_ies);
} }
#ifdef ALERTING_NO_PROGRESS static int call_proceeding_ies[] = {
static int call_proceeding_ies[] = { Q931_CHANNEL_IDENT, -1 }; Q931_CHANNEL_IDENT,
#else #ifndef ALERTING_NO_PROGRESS
static int call_proceeding_ies[] = { Q931_CHANNEL_IDENT, Q931_PROGRESS_INDICATOR, -1 }; Q931_PROGRESS_INDICATOR,
#endif #endif
-1
};
int q931_call_proceeding(struct pri *ctrl, q931_call *c, int channel, int info) int q931_call_proceeding(struct pri *ctrl, q931_call *c, int channel, int info)
{ {
@ -5740,11 +5745,15 @@ int q931_call_proceeding(struct pri *ctrl, q931_call *c, int channel, int info)
c->alive = 1; c->alive = 1;
return send_message(ctrl, c, Q931_CALL_PROCEEDING, call_proceeding_ies); return send_message(ctrl, c, Q931_CALL_PROCEEDING, call_proceeding_ies);
} }
static int alerting_ies[] = {
Q931_IE_FACILITY,
#ifndef ALERTING_NO_PROGRESS #ifndef ALERTING_NO_PROGRESS
static int alerting_ies[] = { Q931_IE_FACILITY, Q931_PROGRESS_INDICATOR, Q931_IE_USER_USER, -1 }; Q931_PROGRESS_INDICATOR,
#else
static int alerting_ies[] = { Q931_IE_FACILITY, -1 };
#endif #endif
Q931_IE_USER_USER,
-1
};
int q931_alerting(struct pri *ctrl, q931_call *c, int channel, int info) int q931_alerting(struct pri *ctrl, q931_call *c, int channel, int info)
{ {