[Freeswitch-svn] [commit] r4106 - in freeswitch/trunk/src: . mod/endpoints/mod_dingaling

Freeswitch SVN anthm at freeswitch.org
Thu Feb 1 00:23:29 EST 2007


Author: anthm
Date: Thu Feb  1 00:23:29 2007
New Revision: 4106

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
   freeswitch/trunk/src/switch_rtp.c

Log:
minor adj

Modified: freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c	Thu Feb  1 00:23:29 2007
@@ -757,7 +757,7 @@
 												 tech_pvt->remote_ip,
 												 tech_pvt->remote_port,
 												 tech_pvt->codec_num,
-												 0,
+                                                 tech_pvt->read_codec.implementation->encoded_bytes_per_frame,
 												 tech_pvt->read_codec.implementation->microseconds_per_frame,
 												 flags,
 												 NULL,
@@ -1527,6 +1527,7 @@
 
 		switch_copy_string(workspace, outbound_profile->destination_number, sizeof(workspace));
 		profile_name = workspace;
+
 		if ((callto = strchr(profile_name, '/'))) {
 			*callto++ = '\0';
 		} else {
@@ -1539,6 +1540,9 @@
 			*dnis++ = '\0';
 		}
 
+        for (p = callto; p && *p; p++) {
+            *p = (char) tolower(*p);
+        }
 
 		if ((p = strchr(profile_name, '@'))) {
 			*p++ = '\0';
@@ -1623,9 +1627,9 @@
 		ldl_session_create(&dlsession, mdl_profile->handle, sess_id, full_id, user, LDL_FLAG_OUTBOUND);
 		tech_pvt->profile = mdl_profile;
 		ldl_session_set_private(dlsession, *new_session);
-		//ldl_session_set_value(dlsession, "dnis", dnis);
-		//ldl_session_set_value(dlsession, "caller_id_name", outbound_profile->caller_id_name);
-		//ldl_session_set_value(dlsession, "caller_id_number", outbound_profile->caller_id_number);
+		ldl_session_set_value(dlsession, "dnis", dnis);
+		ldl_session_set_value(dlsession, "caller_id_name", outbound_profile->caller_id_name);
+		ldl_session_set_value(dlsession, "caller_id_number", outbound_profile->caller_id_number);
 		tech_pvt->dlsession = dlsession;
 		if (!get_codecs(tech_pvt)) {
 			terminate_session(new_session,  __LINE__, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);

Modified: freeswitch/trunk/src/switch_rtp.c
==============================================================================
--- freeswitch/trunk/src/switch_rtp.c	(original)
+++ freeswitch/trunk/src/switch_rtp.c	Thu Feb  1 00:23:29 2007
@@ -758,9 +758,10 @@
 			bytes = sbytes;
 		} 
 
-		if (bytes > 0) {
+		if (bytes > 0 && rtp_session->recv_msg.header.version == 2) {
 			uint32_t effective_size = (uint32_t)(bytes - rtp_header_len);
-            if (rtp_session->recv_msg.header.pt == rtp_session->payload && effective_size != rtp_session->packet_size) {
+            if (effective_size && rtp_session->packet_size && rtp_session->recv_msg.header.pt == rtp_session->payload && 
+                effective_size != rtp_session->packet_size) {
                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Configured packet size %u != inbound packet size %u: auto-correcting..\n",
                                   rtp_session->packet_size,
                                   effective_size



More information about the Freeswitch-svn mailing list