From 3fc6b9c9a533b049f7f4cba5ced5a324bada816e Mon Sep 17 00:00:00 2001 From: markster Date: Thu, 26 Aug 2004 04:56:26 +0000 Subject: Repair offer/answer model (bug #2293), initial CNG work for new frametype git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3658 f38db490-d61c-443f-a65b-d21fe96a405b --- channels/chan_mgcp.c | 2 ++ channels/chan_sip.c | 3 +++ 2 files changed, 5 insertions(+) (limited to 'channels') diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c index c0fd5a7d6..beb80fef6 100755 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -1945,6 +1945,7 @@ static int transmit_modify_with_sdp(struct mgcp_subchannel *sub, struct ast_rtp add_header(&resp, "X", sub->txident); add_header(&resp, "I", sub->cxident); /*add_header(&resp, "S", "");*/ + ast_rtp_offered_from_local(rtp, 0); add_sdp(&resp, sub, rtp); /* SC: fill in new fields */ resp.cmd = MGCP_CMD_MDCX; @@ -1978,6 +1979,7 @@ static int transmit_connect_with_sdp(struct mgcp_subchannel *sub, struct ast_rtp /* SC: X header should not be sent. kept for compatibility */ add_header(&resp, "X", sub->txident); /*add_header(&resp, "S", "");*/ + ast_rtp_offered_from_local(rtp, 1); add_sdp(&resp, sub, rtp); /* SC: fill in new fields */ resp.cmd = MGCP_CMD_CRCX; diff --git a/channels/chan_sip.c b/channels/chan_sip.c index b461284d1..e4f86c1c5 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -3511,6 +3511,7 @@ static int transmit_response_with_sdp(struct sip_pvt *p, char *msg, struct sip_r return -1; } respprep(&resp, p, msg, req); + ast_rtp_offered_from_local(p->rtp, 0); add_sdp(&resp, p); return send_response(p, &resp, retrans, seqno); } @@ -3587,6 +3588,7 @@ static int transmit_reinvite_with_sdp(struct sip_pvt *p) reqprep(&req, p, "INVITE", 0, 1); add_header(&req, "Allow", ALLOWED_METHODS); + ast_rtp_offered_from_local(p->rtp, 1); add_sdp(&req, p); /* Use this as the basis */ copy_request(&p->initreq, &req); @@ -3745,6 +3747,7 @@ static int transmit_invite(struct sip_pvt *p, char *cmd, int sdp, char *auth, ch } add_header(&req, "Allow", ALLOWED_METHODS); if (sdp) { + ast_rtp_offered_from_local(p->rtp, 1); add_sdp(&req, p); } else { add_header(&req, "Content-Length", "0"); -- cgit v1.2.3