[Freeswitch-svn] [commit] r2952 - freeswitch/trunk/src/mod/endpoints/mod_sofia
Freeswitch SVN
anthm at freeswitch.org
Mon Oct 2 13:21:06 EDT 2006
Author: anthm
Date: Mon Oct 2 13:21:06 2006
New Revision: 2952
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
Log:
tweak sofia
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Mon Oct 2 13:21:06 2006
@@ -618,7 +618,7 @@
}
if (tech_pvt->te > 96) {
- snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "a=rtpmap:%d telephone-event/8000\na=fmtp:%d 0-16", tech_pvt->te, tech_pvt->te);
+ snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "a=rtpmap:%d telephone-event/8000\na=fmtp:%d 0-16\n", tech_pvt->te, tech_pvt->te);
}
@@ -1137,11 +1137,12 @@
set_local_sdp(tech_pvt);
activate_rtp(tech_pvt);
if (tech_pvt->nh) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Local SDP:\n%s\n", tech_pvt->local_sdp_str);
nua_respond(tech_pvt->nh, SIP_200_OK,
//SIPTAG_CONTACT(tech_pvt->contact),
- SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), TAG_END());
-
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Local SDP:\n%s\n", tech_pvt->local_sdp_str);
+ SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str),
+ SOATAG_AUDIO_AUX("cn telephone-event"),
+ TAG_END());
}
}
@@ -1434,7 +1435,9 @@
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "183 SDP:\n%s\n", tech_pvt->local_sdp_str);
nua_respond(tech_pvt->nh, SIP_183_SESSION_PROGRESS,
//SIPTAG_CONTACT(tech_pvt->contact),
- SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), TAG_END());
+ SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str),
+ SOATAG_AUDIO_AUX("cn telephone-event"),
+ TAG_END());
}
}
break;
@@ -2243,7 +2246,9 @@
if (!oreg) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No authentication available!\n");
- nua_handle_destroy(nh);
+ if (sofia_private->oreg) {
+ nua_handle_destroy(nh);
+ }
return;
}
@@ -2254,10 +2259,10 @@
}
if (status == 200) {
- if (!sofia_private->session) {
+ if (sofia_private->oreg) {
oreg->state = REG_STATE_REGISTER;
+ nua_handle_destroy(nh);
}
- nua_handle_destroy(nh);
} else if (authenticate) {
char const *realm = (char const *) *authenticate->au_params;
char const *scheme = (char const *) authenticate->au_scheme;
More information about the Freeswitch-svn
mailing list