From ea0a65d5ffeea6bfc657eb6ca6fe330172200c59 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 1 Feb 2007 05:23:29 +0000 Subject: [PATCH] minor adj git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4106 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_dingaling/mod_dingaling.c | 12 ++++++++---- src/switch_rtp.c | 5 +++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/mod/endpoints/mod_dingaling/mod_dingaling.c b/src/mod/endpoints/mod_dingaling/mod_dingaling.c index 0a06c2ccae..8bfcbe4f0c 100644 --- a/src/mod/endpoints/mod_dingaling/mod_dingaling.c +++ b/src/mod/endpoints/mod_dingaling/mod_dingaling.c @@ -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); diff --git a/src/switch_rtp.c b/src/switch_rtp.c index ea425483fe..5dd8152922 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -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