提交 90cd8e0c authored 作者: Anthony Minessale's avatar Anthony Minessale

update

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5816 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 bbb530a6
...@@ -134,8 +134,18 @@ void sofia_event_callback(nua_event_t event, ...@@ -134,8 +134,18 @@ void sofia_event_callback(nua_event_t event,
} }
break; break;
case nua_r_get_params:
case nua_r_invite: case nua_r_invite:
{
if (channel) {
char *val;
if ((val = switch_channel_get_variable(channel, "sip_auto_answer")) && switch_true(val)) {
nua_notify(nh, NUTAG_NEWSUB(1), NUTAG_SUBSTATE(nua_substate_active), SIPTAG_EVENT_STR("talk"), TAG_END());
}
}
}
break;
case nua_r_get_params:
case nua_r_unregister: case nua_r_unregister:
case nua_r_options: case nua_r_options:
case nua_i_fork: case nua_i_fork:
...@@ -305,14 +315,17 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void ...@@ -305,14 +315,17 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void
nua_set_params(profile->nua, nua_set_params(profile->nua,
NUTAG_APPL_METHOD("OPTIONS"), NUTAG_APPL_METHOD("OPTIONS"),
NUTAG_APPL_METHOD("NOTIFY"),
//NUTAG_EARLY_MEDIA(1), //NUTAG_EARLY_MEDIA(1),
NUTAG_AUTOANSWER(0), NUTAG_AUTOANSWER(0),
NUTAG_AUTOALERT(0), NUTAG_AUTOALERT(0),
NUTAG_ALLOW("REGISTER"), NUTAG_ALLOW("REGISTER"),
NUTAG_ALLOW("REFER"), NUTAG_ALLOW("REFER"),
NUTAG_ALLOW("INFO"), NUTAG_ALLOW("INFO"),
NUTAG_ALLOW("NOTIFY"),
NUTAG_ALLOW_EVENTS("talk"),
TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW("PUBLISH")), TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW("PUBLISH")),
TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW("NOTIFY")), //TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW("NOTIFY")),
TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW("SUBSCRIBE")), TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW("SUBSCRIBE")),
TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ENABLEMESSAGE(1)), TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ENABLEMESSAGE(1)),
TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW_EVENTS("presence")), TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW_EVENTS("presence")),
......
...@@ -598,6 +598,8 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session) ...@@ -598,6 +598,8 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
SOATAG_RTP_SORT(SOA_RTP_SORT_REMOTE), SOATAG_RTP_SORT(SOA_RTP_SORT_REMOTE),
SOATAG_RTP_SELECT(SOA_RTP_SELECT_ALL), TAG_IF(rep, SIPTAG_REPLACES_STR(rep)), SOATAG_HOLD(holdstr), TAG_END()); SOATAG_RTP_SELECT(SOA_RTP_SELECT_ALL), TAG_IF(rep, SIPTAG_REPLACES_STR(rep)), SOATAG_HOLD(holdstr), TAG_END());
switch_safe_free(stream.data); switch_safe_free(stream.data);
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论