forked from cc/osmo-cc-sip-endpoint
Fixed SDP response on every 200 INVITE response
Calls will fail, if the SDP is not included, even if it was included in session progress message. If the remote SIP peer ignores it, it must be included in the final 200 OK message.
This commit is contained in:
parent
f071f0e738
commit
7fc8bb5954
|
@ -657,8 +657,13 @@ static void setup_rsp(call_t *call, osmo_cc_msg_t *msg)
|
|||
int rc;
|
||||
|
||||
rc = osmo_cc_get_ie_sdp(msg, 0, sdp_buffer, sizeof(sdp_buffer));
|
||||
if (rc >= 0) {
|
||||
if (rc < 0) {
|
||||
PDEBUG(DSIP, DEBUG_DEBUG, " -> No SDP, so we re-use the one we received earlier.\n");
|
||||
sdp = call->sdp_response;
|
||||
} else
|
||||
sdp = sdp_buffer;
|
||||
|
||||
if (sdp) {
|
||||
if (call->sip_ep->public_ip[0]) {
|
||||
sdp = sdp_replace_contact(sdp, call->sip_ep->public_ip);
|
||||
PDEBUG(DSIP, DEBUG_DEBUG, " -> Modify Contact line(s) of SDP:\n");
|
||||
|
@ -667,7 +672,7 @@ static void setup_rsp(call_t *call, osmo_cc_msg_t *msg)
|
|||
call->sdp_response = strdup(sdp);
|
||||
osmo_cc_debug_sdp(sdp);
|
||||
} else
|
||||
sdp = NULL;
|
||||
PDEBUG(DSIP, DEBUG_INFO, "There was no SDP received during PROC/ALERT/PROGRESS/SETUP-RSP from Osmo-CC. The call will fail due to missing SDP. (callref %d)\n", call->cc_callref);
|
||||
|
||||
PDEBUG(DSIP, DEBUG_INFO, "Sending INVITE response: %d %s (callref %d)\n", SIP_200_OK, call->cc_callref);
|
||||
|
||||
|
|
Loading…
Reference in New Issue