FS-2748
This commit is contained in:
parent
41bb745c2a
commit
c87b60278e
|
@ -226,6 +226,8 @@
|
||||||
<!--all inbound reg will stored in the db using this domain -->
|
<!--all inbound reg will stored in the db using this domain -->
|
||||||
<param name="force-register-db-domain" value="$${domain}"/>
|
<param name="force-register-db-domain" value="$${domain}"/>
|
||||||
|
|
||||||
|
<!--<param name="delete-subs-on-register" value="false"/>-->
|
||||||
|
|
||||||
<!-- enable rtcp on every channel also can be done per leg basis with rtcp_audio_interval_msec variable set to passthru to pass it across a call-->
|
<!-- enable rtcp on every channel also can be done per leg basis with rtcp_audio_interval_msec variable set to passthru to pass it across a call-->
|
||||||
<!--<param name="rtcp-audio-interval-msec" value="5000"/>-->
|
<!--<param name="rtcp-audio-interval-msec" value="5000"/>-->
|
||||||
<!--<param name="rtcp-video-interval-msec" value="5000"/>-->
|
<!--<param name="rtcp-video-interval-msec" value="5000"/>-->
|
||||||
|
|
|
@ -220,6 +220,7 @@ typedef enum {
|
||||||
PFLAG_T38_PASSTHRU,
|
PFLAG_T38_PASSTHRU,
|
||||||
PFLAG_CID_IN_1XX,
|
PFLAG_CID_IN_1XX,
|
||||||
PFLAG_IN_DIALOG_CHAT,
|
PFLAG_IN_DIALOG_CHAT,
|
||||||
|
PFLAG_DEL_SUBS_ON_REG,
|
||||||
/* No new flags below this line */
|
/* No new flags below this line */
|
||||||
PFLAG_MAX
|
PFLAG_MAX
|
||||||
} PFLAGS;
|
} PFLAGS;
|
||||||
|
|
|
@ -2265,6 +2265,12 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile)
|
||||||
} else {
|
} else {
|
||||||
sofia_clear_pflag(profile, PFLAG_PASS_CALLEE_ID);
|
sofia_clear_pflag(profile, PFLAG_PASS_CALLEE_ID);
|
||||||
}
|
}
|
||||||
|
} else if (!strcasecmp(var, "delete-subs-on-register")) {
|
||||||
|
if (switch_true(val)) {
|
||||||
|
sofia_set_pflag(profile, PFLAG_DEL_SUBS_ON_REG);
|
||||||
|
} else {
|
||||||
|
sofia_clear_pflag(profile, PFLAG_DEL_SUBS_ON_REG);
|
||||||
|
}
|
||||||
} else if (!strcasecmp(var, "in-dialog-chat")) {
|
} else if (!strcasecmp(var, "in-dialog-chat")) {
|
||||||
if (switch_true(val)) {
|
if (switch_true(val)) {
|
||||||
sofia_set_pflag(profile, PFLAG_IN_DIALOG_CHAT);
|
sofia_set_pflag(profile, PFLAG_IN_DIALOG_CHAT);
|
||||||
|
@ -2949,6 +2955,12 @@ switch_status_t config_sofia(int reload, char *profile_name)
|
||||||
} else {
|
} else {
|
||||||
sofia_clear_pflag(profile, PFLAG_IN_DIALOG_CHAT);
|
sofia_clear_pflag(profile, PFLAG_IN_DIALOG_CHAT);
|
||||||
}
|
}
|
||||||
|
} else if (!strcasecmp(var, "delete-subs-on-register")) {
|
||||||
|
if (switch_true(val)) {
|
||||||
|
sofia_set_pflag(profile, PFLAG_DEL_SUBS_ON_REG);
|
||||||
|
} else {
|
||||||
|
sofia_clear_pflag(profile, PFLAG_DEL_SUBS_ON_REG);
|
||||||
|
}
|
||||||
} else if (!strcasecmp(var, "t38-passthru")) {
|
} else if (!strcasecmp(var, "t38-passthru")) {
|
||||||
if (switch_true(val)) {
|
if (switch_true(val)) {
|
||||||
sofia_set_pflag(profile, PFLAG_T38_PASSTHRU);
|
sofia_set_pflag(profile, PFLAG_T38_PASSTHRU);
|
||||||
|
|
|
@ -820,9 +820,10 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
|
||||||
switch_event_t *auth_params = NULL;
|
switch_event_t *auth_params = NULL;
|
||||||
int r = 0;
|
int r = 0;
|
||||||
long reg_count = 0;
|
long reg_count = 0;
|
||||||
int delete_subs = 1;
|
int delete_subs;
|
||||||
const char *agent = "unknown";
|
const char *agent = "unknown";
|
||||||
|
|
||||||
|
delete_subs = sofia_test_pflag(profile, PFLAG_DEL_SUBS_ON_REG);
|
||||||
|
|
||||||
/* all callers must confirm that sip, sip->sip_request and sip->sip_contact are not NULL */
|
/* all callers must confirm that sip, sip->sip_request and sip->sip_contact are not NULL */
|
||||||
switch_assert(sip != NULL && sip->sip_contact != NULL && sip->sip_request != NULL);
|
switch_assert(sip != NULL && sip->sip_contact != NULL && sip->sip_request != NULL);
|
||||||
|
@ -841,10 +842,6 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
|
||||||
|
|
||||||
if (sip->sip_user_agent) {
|
if (sip->sip_user_agent) {
|
||||||
agent = sip->sip_user_agent->g_string;
|
agent = sip->sip_user_agent->g_string;
|
||||||
|
|
||||||
if (switch_stristr("snom", agent)) {
|
|
||||||
delete_subs = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (from) {
|
if (from) {
|
||||||
|
|
Loading…
Reference in New Issue