提交 82aa3314 authored 作者: Michael Jerris's avatar Michael Jerris 提交者: Brian West

FS-6531: #resolve set to tag on auto answer notify to make grandstream happy,…

FS-6531: #resolve set to tag on auto answer notify to make grandstream happy, even tho they could have matched the dialog fine off the from tag like every other phone does.
上级 87a4670d
...@@ -6665,10 +6665,19 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status, ...@@ -6665,10 +6665,19 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
} }
if (channel && (status == 180 || status == 183) && switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) { if (channel && (status == 180 || status == 183) && switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
const char *full_to = NULL;
const char *val; const char *val;
if ((val = switch_channel_get_variable(channel, "sip_auto_answer")) && switch_true(val)) { if ((val = switch_channel_get_variable(channel, "sip_auto_answer")) && switch_true(val)) {
nua_notify(nh, NUTAG_NEWSUB(1), NUTAG_WITH_THIS_MSG(de->data->e_msg), full_to = switch_str_nil(switch_channel_get_variable(channel, "sip_full_to"));
NUTAG_SUBSTATE(nua_substate_terminated),SIPTAG_SUBSCRIPTION_STATE_STR("terminated;reason=noresource"), SIPTAG_EVENT_STR("talk"), TAG_END());
nua_notify(nh,
NUTAG_NEWSUB(1),
NUTAG_WITH_THIS_MSG(de->data->e_msg),
NUTAG_SUBSTATE(nua_substate_terminated),
TAG_IF((full_to), SIPTAG_TO_STR(full_to)),
SIPTAG_SUBSCRIPTION_STATE_STR("terminated;reason=noresource"),
SIPTAG_EVENT_STR("talk"),
TAG_END());
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论