- fix: ACK may contain SDP body, process it

This commit is contained in:
Thomas Ries 2005-04-21 22:41:02 +00:00
parent ab78ddb984
commit e9178c2a89
2 changed files with 14 additions and 8 deletions

View File

@ -1,5 +1,6 @@
0.5.11
======
21-Apr-2005: - fix: ACK may contain SDP body, process it
19-Apr-2005: - feature: DSCP value for RTP packets defineable (by Nick
Vermeer, Internet Express)
15-Apr-2005: - feature: auto-save registration table during operation

View File

@ -270,15 +270,12 @@ int proxy_request (sip_ticket_t *ticket) {
/* check for incoming request */
} else if (MSG_IS_INVITE(request)) {
/* First, rewrite the body */
if (configuration.rtp_proxy_enable == 1) {
sts = proxy_rewrite_invitation_body(request, DIR_INCOMING);
}
/* Rewrite the body */
sts = proxy_rewrite_invitation_body(request, DIR_INCOMING);
/*
* Note: Incoming requests have no need to rewrite Contact
* header - as we are not masquerading something there
*/
} else if (MSG_IS_ACK(request)) {
/* Rewrite the body */
sts = proxy_rewrite_invitation_body(request, DIR_INCOMING);
}
break;
@ -324,6 +321,8 @@ int proxy_request (sip_ticket_t *ticket) {
/* if an INVITE, rewrite body */
if (MSG_IS_INVITE(request)) {
sts = proxy_rewrite_invitation_body(request, DIR_OUTGOING);
} else if (MSG_IS_ACK(request)) {
sts = proxy_rewrite_invitation_body(request, DIR_OUTGOING);
}
/* if this is CANCEL/BYE request, stop RTP proxying */
@ -956,6 +955,7 @@ int proxy_rewrite_invitation_body(osip_message_t *mymsg, int direction){
*/
sts = osip_message_get_body(mymsg, 0, &body);
if (sts != 0) {
#if 0
if ((MSG_IS_RESPONSE_FOR(mymsg,"INVITE")) &&
(MSG_IS_STATUS_1XX(mymsg))) {
/* 1xx responses *MAY* contain SDP data */
@ -967,6 +967,11 @@ int proxy_rewrite_invitation_body(osip_message_t *mymsg, int direction){
ERROR("rewrite_invitation_body: no body found in message");
return STS_FAILURE;
}
#else
DEBUGC(DBCLASS_PROXY, "rewrite_invitation_body: "
"no body found in message");
return STS_SUCCESS;
#endif
}
sts = sip_body_to_str(body, &bodybuff, &bodybuflen);