提交 dbed41b4 authored 作者: Anthony Minessale's avatar Anthony Minessale

use the same call-id on all registers from the same gateway

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10415 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 64a0bfc5
...@@ -299,6 +299,7 @@ struct sofia_gateway { ...@@ -299,6 +299,7 @@ struct sofia_gateway {
switch_memory_pool_t *pool; switch_memory_pool_t *pool;
int deleted; int deleted;
switch_event_t *vars; switch_event_t *vars;
char uuid_str[SWITCH_UUID_FORMATTED_LENGTH + 1];
struct sofia_gateway *next; struct sofia_gateway *next;
}; };
......
...@@ -801,6 +801,10 @@ static void parse_gateways(sofia_profile_t *profile, switch_xml_t gateways_tag) ...@@ -801,6 +801,10 @@ static void parse_gateways(sofia_profile_t *profile, switch_xml_t gateways_tag)
*from_user = "", *from_domain = "", *register_proxy = NULL, *contact_params = NULL, *params = NULL, *register_transport = NULL; *from_user = "", *from_domain = "", *register_proxy = NULL, *contact_params = NULL, *params = NULL, *register_transport = NULL;
uint32_t ping_freq = 0; uint32_t ping_freq = 0;
switch_uuid_t uuid;
switch_uuid_get(&uuid);
switch_uuid_format(gateway->uuid_str, &uuid);
gateway->register_transport = SOFIA_TRANSPORT_UDP; gateway->register_transport = SOFIA_TRANSPORT_UDP;
gateway->pool = profile->pool; gateway->pool = profile->pool;
......
...@@ -152,6 +152,7 @@ void sofia_reg_check_gateway(sofia_profile_t *profile, time_t now) ...@@ -152,6 +152,7 @@ void sofia_reg_check_gateway(sofia_profile_t *profile, time_t now)
sofia_reg_kill_reg(gateway_ptr, 0); sofia_reg_kill_reg(gateway_ptr, 0);
if ((gateway_ptr->nh = nua_handle(gateway_ptr->profile->nua, NULL, if ((gateway_ptr->nh = nua_handle(gateway_ptr->profile->nua, NULL,
SIPTAG_CALL_ID_STR(gateway_ptr->uuid_str),
NUTAG_URL(gateway_ptr->register_proxy), NUTAG_URL(gateway_ptr->register_proxy),
SIPTAG_TO_STR(gateway_ptr->register_to), SIPTAG_TO_STR(gateway_ptr->register_to),
NUTAG_CALLSTATE_REF(ss_state), SIPTAG_FROM_STR(gateway_ptr->register_from), TAG_END()))) { NUTAG_CALLSTATE_REF(ss_state), SIPTAG_FROM_STR(gateway_ptr->register_from), TAG_END()))) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论