From a9438c51cbfb232e73ba9c9d56d8cefff9f03650 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 13 Apr 2006 21:34:04 +0000 Subject: [PATCH] fix git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1145 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_wanpipe/mod_wanpipe.c | 5 ++--- src/switch_rtp.c | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c b/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c index 4cb459be20..d1cfea4bbd 100644 --- a/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c +++ b/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c @@ -786,8 +786,6 @@ static switch_status wanpipe_outgoing_channel(switch_core_session *session, swit } } - - switch_channel_set_caller_profile(channel, caller_profile); tech_pvt->caller_profile = caller_profile; if (bchan) { @@ -802,7 +800,7 @@ static switch_status wanpipe_outgoing_channel(switch_core_session *session, swit switch_set_flag(tech_pvt, TFLAG_NOSIG); snprintf(name, sizeof(name), "WanPipe/%s/nosig-%04x", bchan, rand() & 0xffff); switch_channel_set_name(channel, name); - + switch_channel_set_caller_profile(channel, caller_profile); } else { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Invalid address\n"); switch_core_session_destroy(new_session); @@ -854,6 +852,7 @@ static switch_status wanpipe_outgoing_channel(switch_core_session *session, swit snprintf(name, sizeof(name), "WanPipe/s%dc%d/%s-%04x", spri->span, channo, caller_profile->destination_number, rand() & 0xffff); switch_channel_set_name(channel, name); + switch_channel_set_caller_profile(channel, caller_profile); sr = pri_sr_new(); pri_sr_set_channel(sr, channo, 0, 0); pri_sr_set_bearer(sr, 0, SPANS[span]->l1); diff --git a/src/switch_rtp.c b/src/switch_rtp.c index 9f4c578dd3..c80df57386 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -606,7 +606,7 @@ static int rtp_common_write(switch_rtp *rtp_session, void *data, uint32_t datale bytes = sbytes; } - + rtp_session->send_msg.header.pt = rtp_session->payload; switch_socket_sendto(rtp_session->sock, rtp_session->remote_addr, 0, (void*)&rtp_session->send_msg, &bytes); if (rtp_session->ice_user) { @@ -631,7 +631,6 @@ SWITCH_DECLARE(int) switch_rtp_write(switch_rtp *rtp_session, void *data, uint32 rtp_session->seq = htons(rtp_session->seq); rtp_session->send_msg.header.seq = rtp_session->seq; rtp_session->send_msg.header.ts = htonl(rtp_session->ts); - rtp_session->payload = (uint8_t)htonl(rtp_session->payload); return rtp_common_write(rtp_session, data, datalen, rtp_session->payload); @@ -643,10 +642,10 @@ SWITCH_DECLARE(int) switch_rtp_write_payload(switch_rtp *rtp_session, void *data if (!switch_test_flag(rtp_session, SWITCH_RTP_FLAG_IO) || !rtp_session->remote_addr) { return -1; } + rtp_session->ts += ts; rtp_session->send_msg.header.seq = htons(mseq); rtp_session->send_msg.header.ts = htonl(rtp_session->ts); - rtp_session->send_msg.header.pt = (uint8_t)htonl(payload); return rtp_common_write(rtp_session, data, datalen, payload); }