Skip to content

Commit

Permalink
add SDP management for Re-Invite and reply
Browse files Browse the repository at this point in the history
  • Loading branch information
mwolff44 committed Feb 4, 2025
1 parent b556af0 commit 2156cc6
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/sip/kamailio.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -518,9 +518,9 @@ route[WITHINDLG] {
if (is_method("BYE")) {
setflag(FLT_ACC); # do accounting ...
setflag(FLT_ACCFAILED); # ... even if the transaction fails
} else if ( is_method("ACK|UPDATE") ) {
} else if ( is_method("ACK|INVITE|UPDATE") ) {
# ACK is forwarded statelessly and UPDATE will be used to update the SDP INVITE in dialog
if (is_method("UPDATE")) {
if (is_method("INVITE|UPDATE")) {
route(RTPE);
}
route(NATMANAGE);
Expand Down Expand Up @@ -849,6 +849,16 @@ onreply_route[MANAGE_REPLY] {
route(NATMANAGE);
}

if (has_body("application/sdp")) {
if (route(MSG_RECV_EXTERNAL)) {
xinfo("rtpe answer from external\n");
rtpengine_answer("replace-origin replace-session-connection direction=external direction=internal");
} else {
xinfo("rtpe answer from internal\n");
rtpengine_answer("replace-origin replace-session-connection direction=internal direction=external");
}
}

return;
}

Expand Down

0 comments on commit 2156cc6

Please sign in to comment.