[commit] r13865 - freeswitch/trunk/src/mod/endpoints/mod_sofia
Author: mrene Date: Fri Jun 19 10:48:23 2009 New Revision: 13865 Log: MODENDP-221 Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c ============================================================================== --- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c (original) +++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c Fri Jun 19 10:48:23 2009 @@ -388,17 +388,21 @@ { sofia_profile_t *profile = (sofia_profile_t *) pArg; nua_handle_t *nh; - char *contact = NULL; char to[128] = ""; + sofia_destination_t *dst = NULL; switch_snprintf(to, sizeof(to), "sip:%s@%s", argv[1], argv[2]); - contact = sofia_glue_get_url_from_contact(argv[3], 1); + 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(contact), SIPTAG_CONTACT_STR(profile->url), TAG_END()); + 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()); nua_handle_bind(nh, &mod_sofia_globals.destroy_private); - nua_options(nh, TAG_END()); + nua_options(nh, + TAG_IF(dst->route_uri, NUTAG_PROXY(dst->route_uri)), + TAG_IF(dst->route, SIPTAG_ROUTE_STR(dst->route)), + TAG_END()); - switch_safe_free(contact); + sofia_glue_free_destination(dst); return 0; }
participants (1)
-
FreeSWITCH SVN