]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
minor adj
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 1 Feb 2007 05:23:29 +0000 (05:23 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 1 Feb 2007 05:23:29 +0000 (05:23 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4106 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_dingaling/mod_dingaling.c
src/switch_rtp.c

index 0a06c2ccae4273c205a64a629f6bd33185f46207..8bfcbe4f0caa8bdf1c8960a8b76177e5c2c4a0b1 100644 (file)
@@ -757,7 +757,7 @@ static int activate_rtp(struct private_object *tech_pvt)
                                                                                                 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 @@ static switch_status_t channel_outgoing_channel(switch_core_session_t *session,
 
                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 @@ static switch_status_t channel_outgoing_channel(switch_core_session_t *session,
                        *dnis++ = '\0';
                }
 
+        for (p = callto; p && *p; p++) {
+            *p = (char) tolower(*p);
+        }
 
                if ((p = strchr(profile_name, '@'))) {
                        *p++ = '\0';
@@ -1623,9 +1627,9 @@ static switch_status_t channel_outgoing_channel(switch_core_session_t *session,
                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);
index ea425483fe46e6a89807291b98f90b909011f9ef..5dd815292230ec35a6e845f081ae46860c8b1034 100644 (file)
@@ -758,9 +758,10 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
                        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