提交 979c3778 authored 作者: Stefan Knoblich's avatar Stefan Knoblich

duh, much better (and faster) this way, thanks mrene and mikej... forgot we…

duh, much better (and faster) this way, thanks mrene and mikej... forgot we added this one to speed things up

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13091 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 0412ae8e
...@@ -3995,37 +3995,37 @@ void sofia_handle_sip_i_info(nua_t *nua, sofia_profile_t *profile, nua_handle_t ...@@ -3995,37 +3995,37 @@ void sofia_handle_sip_i_info(nua_t *nua, sofia_profile_t *profile, nua_handle_t
if (switch_event_create(&event, SWITCH_EVENT_RECV_INFO) == SWITCH_STATUS_SUCCESS) { if (switch_event_create(&event, SWITCH_EVENT_RECV_INFO) == SWITCH_STATUS_SUCCESS) {
if (sip->sip_content_type) { if (sip->sip_content_type) {
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "SIP-Content-Type", "%s", sip->sip_content_type->c_type); switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "SIP-Content-Type", sip->sip_content_type->c_type);
} }
if (sip->sip_from && sip->sip_from->a_url) { if (sip->sip_from && sip->sip_from->a_url) {
if (sip->sip_from->a_url->url_user) { if (sip->sip_from->a_url->url_user) {
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "SIP-From-User", "%s", sip->sip_from->a_url->url_user); switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "SIP-From-User", sip->sip_from->a_url->url_user);
} }
if (sip->sip_from->a_url->url_host) { if (sip->sip_from->a_url->url_host) {
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "SIP-From-Host", "%s", sip->sip_from->a_url->url_host); switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "SIP-From-Host", sip->sip_from->a_url->url_host);
} }
} }
if (sip->sip_to && sip->sip_to->a_url) { if (sip->sip_to && sip->sip_to->a_url) {
if (sip->sip_to->a_url->url_user) { if (sip->sip_to->a_url->url_user) {
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "SIP-To-User", "%s", sip->sip_to->a_url->url_user); switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "SIP-To-User", sip->sip_to->a_url->url_user);
} }
if (sip->sip_to->a_url->url_host) { if (sip->sip_to->a_url->url_host) {
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "SIP-To-Host", "%s", sip->sip_to->a_url->url_host); switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "SIP-To-Host", sip->sip_to->a_url->url_host);
} }
} }
if (sip->sip_contact && sip->sip_contact->m_url) { if (sip->sip_contact && sip->sip_contact->m_url) {
if (sip->sip_contact->m_url->url_user) { if (sip->sip_contact->m_url->url_user) {
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "SIP-Contact-User", "%s", sip->sip_contact->m_url->url_user); switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "SIP-Contact-User", sip->sip_contact->m_url->url_user);
} }
if (sip->sip_contact->m_url->url_host) { if (sip->sip_contact->m_url->url_host) {
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "SIP-Contact-Host", "%s", sip->sip_contact->m_url->url_host); switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "SIP-Contact-Host", sip->sip_contact->m_url->url_host);
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论