FS-4882 --resolve

This commit is contained in:
Anthony Minessale committed 2012-11-29 12:59:33 -06:00
1 parent 685da11d0d
commit 395b7a9799
2 files changed
+11 -5

No files matched your search

+9 -3
View File
@@ -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),