Add 'omit_redirecting_number' option to libpri (opts param)
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@711 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
parent
c00f23e632
commit
3487435ba9
|
@ -86,6 +86,10 @@ static uint32_t parse_opts(const char *in)
|
|||
if (strstr(in, "omit_display")) {
|
||||
flags |= OZMOD_LIBPRI_OPT_OMIT_DISPLAY_IE;
|
||||
}
|
||||
|
||||
if (strstr(in, "omit_redirecting_number")) {
|
||||
flags |= OZMOD_LIBPRI_OPT_OMIT_REDIRECTING_NUMBER_IE;
|
||||
}
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
@ -484,8 +488,11 @@ static __inline__ void state_advance(zap_channel_t *zchan)
|
|||
pri_sr_set_called(sr, zchan->caller_data.ani.digits, dp, 1);
|
||||
pri_sr_set_caller(sr, zchan->caller_data.cid_num.digits, (isdn_data->opts & OZMOD_LIBPRI_OPT_OMIT_DISPLAY_IE ? NULL : zchan->caller_data.cid_name),
|
||||
dp, PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN);
|
||||
pri_sr_set_redirecting(sr, zchan->caller_data.cid_num.digits, dp, PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN, PRI_REDIR_UNCONDITIONAL);
|
||||
|
||||
|
||||
if (!(isdn_data->opts & OZMOD_LIBPRI_OPT_OMIT_REDIRECTING_NUMBER_IE)) {
|
||||
pri_sr_set_redirecting(sr, zchan->caller_data.cid_num.digits, dp, PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN, PRI_REDIR_UNCONDITIONAL);
|
||||
}
|
||||
|
||||
if (pri_setup(isdn_data->spri.pri, call, sr)) {
|
||||
zchan->caller_data.hangup_cause = ZAP_CAUSE_DESTINATION_OUT_OF_ORDER;
|
||||
zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_HANGUP);
|
||||
|
|
|
@ -41,8 +41,9 @@ typedef enum {
|
|||
OZMOD_LIBPRI_OPT_NONE = 0,
|
||||
OZMOD_LIBPRI_OPT_SUGGEST_CHANNEL = (1 << 0),
|
||||
OZMOD_LIBPRI_OPT_OMIT_DISPLAY_IE = (2 << 0),
|
||||
|
||||
OZMOD_LIBPRI_OPT_MAX = (3 << 0)
|
||||
OZMOD_LIBPRI_OPT_OMIT_REDIRECTING_NUMBER_IE = (3 << 0),
|
||||
|
||||
OZMOD_LIBPRI_OPT_MAX = (4 << 0)
|
||||
} zap_isdn_opts_t;
|
||||
|
||||
typedef enum {
|
||||
|
|
Loading…
Reference in New Issue