提交 fb618979 authored 作者: Brian West's avatar Brian West

allow send_message and notify events to send a message/notify without a body if needed.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9590 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 4e020186
...@@ -2098,7 +2098,7 @@ static void general_event_handler(switch_event_t *event) ...@@ -2098,7 +2098,7 @@ static void general_event_handler(switch_event_t *event)
sofia_profile_t *profile; sofia_profile_t *profile;
nua_handle_t *nh; nua_handle_t *nh;
if (profile_name && ct && es && body && user && host && (profile = sofia_glue_find_profile(profile_name))) { if (profile_name && ct && es && user && host && (profile = sofia_glue_find_profile(profile_name))) {
char *id = NULL; char *id = NULL;
char *contact, *p; char *contact, *p;
char buf[512] = ""; char buf[512] = "";
...@@ -2129,7 +2129,7 @@ static void general_event_handler(switch_event_t *event) ...@@ -2129,7 +2129,7 @@ static void general_event_handler(switch_event_t *event)
NUTAG_NEWSUB(1), NUTAG_NEWSUB(1),
SIPTAG_EVENT_STR(es), SIPTAG_EVENT_STR(es),
SIPTAG_CONTENT_TYPE_STR(ct), SIPTAG_CONTENT_TYPE_STR(ct),
SIPTAG_PAYLOAD_STR(body), TAG_IF(!switch_strlen_zero(body), SIPTAG_PAYLOAD_STR(body)),
TAG_END()); TAG_END());
...@@ -2149,7 +2149,7 @@ static void general_event_handler(switch_event_t *event) ...@@ -2149,7 +2149,7 @@ static void general_event_handler(switch_event_t *event)
sofia_profile_t *profile; sofia_profile_t *profile;
nua_handle_t *nh; nua_handle_t *nh;
if (profile_name && ct && body && user && host) { if (profile_name && ct && user && host) {
char *id = NULL; char *id = NULL;
char *contact, *p; char *contact, *p;
char buf[512] = ""; char buf[512] = "";
...@@ -2185,7 +2185,7 @@ static void general_event_handler(switch_event_t *event) ...@@ -2185,7 +2185,7 @@ static void general_event_handler(switch_event_t *event)
nua_message(nh, nua_message(nh,
NUTAG_NEWSUB(1), NUTAG_NEWSUB(1),
SIPTAG_CONTENT_TYPE_STR(ct), SIPTAG_CONTENT_TYPE_STR(ct),
SIPTAG_PAYLOAD_STR(body), TAG_IF(!switch_strlen_zero(body), SIPTAG_PAYLOAD_STR(body)),
TAG_END()); TAG_END());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论