Repair offer/answer model (bug #2293), initial CNG work for new frametype

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3658 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-08-26 04:56:26 +00:00
parent 03cd30b746
commit fa814abe05
5 changed files with 40 additions and 37 deletions

View File

@@ -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;

View File

@@ -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");