FS-4882 --resolve
This commit is contained in:
parent
685da11d0d
commit
395b7a9799
|
@ -4781,10 +4781,10 @@ static void sofia_handle_sip_r_options(switch_core_session_t *session, int statu
|
|||
gateway->ping = switch_epoch_time_now(NULL) + gateway->ping_freq;
|
||||
sofia_reg_release_gateway(gateway);
|
||||
gateway->pinging = 0;
|
||||
} else if (sofia_test_pflag(profile, PFLAG_UNREG_OPTIONS_FAIL) && (status != 200 && status != 486) && sip && sip->sip_to) {
|
||||
} else if (sofia_test_pflag(profile, PFLAG_UNREG_OPTIONS_FAIL) && (status != 200 && status != 486) && sip && sip->sip_to && strchr(sip->sip_call_id->i_id, '_')) {
|
||||
char *sql;
|
||||
time_t now = switch_epoch_time_now(NULL);
|
||||
const char *call_id = sip->sip_call_id->i_id;
|
||||
const char *call_id = strchr(sip->sip_call_id->i_id, '_') + 1;
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Expire registration '%s@%s' due to options failure\n",
|
||||
sip->sip_to->a_url->url_user, sip->sip_to->a_url->url_host);
|
||||
|
|
|
@ -557,17 +557,23 @@ int sofia_reg_nat_callback(void *pArg, int argc, char **argv, char **columnNames
|
|||
{
|
||||
sofia_profile_t *profile = (sofia_profile_t *) pArg;
|
||||
nua_handle_t *nh;
|
||||
char to[512] = "";
|
||||
char to[512] = "", call_id[512] = "";
|
||||
sofia_destination_t *dst = NULL;
|
||||
switch_uuid_t uuid;
|
||||
|
||||
switch_snprintf(to, sizeof(to), "sip:%s@%s", argv[1], argv[2]);
|
||||
|
||||
// create call-id for OPTIONS in the form "<uuid>_<original-register-call-id>"
|
||||
switch_uuid_get(&uuid);
|
||||
switch_uuid_format(call_id, &uuid);
|
||||
strcat(call_id, "_");
|
||||
strncat(call_id, argv[0], sizeof(call_id) - SWITCH_UUID_FORMATTED_LENGTH - 2);
|
||||
|
||||
dst = sofia_glue_get_destination(argv[3]);
|
||||
switch_assert(dst);
|
||||
|
||||
nh = nua_handle(profile->nua, NULL, SIPTAG_FROM_STR(profile->url), SIPTAG_TO_STR(to), NUTAG_URL(dst->contact), SIPTAG_CONTACT_STR(profile->url),
|
||||
TAG_END());
|
||||
//SIPTAG_CALL_ID_STR(argv[0]), TAG_END());
|
||||
SIPTAG_CALL_ID_STR(call_id), TAG_END());
|
||||
nua_handle_bind(nh, &mod_sofia_globals.destroy_private);
|
||||
nua_options(nh,
|
||||
NTATAG_SIP_T2(5000),
|
||||
|
|
Loading…
Reference in New Issue