[Freeswitch-svn] [commit] r5816 - freeswitch/trunk/src/mod/endpoints/mod_sofia

Freeswitch SVN anthm at freeswitch.org
Fri Oct 5 12:49:15 EDT 2007


Author: anthm
Date: Fri Oct  5 12:49:15 2007
New Revision: 5816

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c

Log:
update

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	Fri Oct  5 12:49:15 2007
@@ -134,8 +134,18 @@
 			
 		}
 		break;
-	case nua_r_get_params:
+
 	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_options:
 	case nua_i_fork:
@@ -305,14 +315,17 @@
 
 	nua_set_params(profile->nua,
 				   NUTAG_APPL_METHOD("OPTIONS"),
+				   NUTAG_APPL_METHOD("NOTIFY"),
 				   //NUTAG_EARLY_MEDIA(1),                 
 				   NUTAG_AUTOANSWER(0),
 				   NUTAG_AUTOALERT(0),
 				   NUTAG_ALLOW("REGISTER"),
 				   NUTAG_ALLOW("REFER"),
 				   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("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_ENABLEMESSAGE(1)),
 				   TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW_EVENTS("presence")),

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c	Fri Oct  5 12:49:15 2007
@@ -598,6 +598,8 @@
 			   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());
 
+
+
 	switch_safe_free(stream.data);
 
 	return SWITCH_STATUS_SUCCESS;



More information about the Freeswitch-svn mailing list