[SR-Users] How reply INVITE request with 200 OK that contains SDP?

Ali Shirvani aj.shirvani at gmail.com
Tue Jun 11 16:36:05 CEST 2019


Hi all,

I tried to implement simple announcer by using play_media function in
latest rtpengine module. I implemented simple Lua script and I tried to
test the implementation with simple SIPp scenario.

Here is the Lua function to reply the received INVITE request.

```Lua
function ksr_route_announcer()
    KSR.info("======= Announcer =====\n");
    local u = KSR.pv.gete("$rU");
    KSR.info("username is: " .. u .. "\n");
    if u == "ann" then
         KSR.info("announcer has been called.\n");
         if KSR.textops.has_body_type("application/sdp") then
              KSR.info("request contains SDP.\n");
              KSR.tm.t_newtran();
              KSR.rtpengine.rtpengine_manage0();
              KSR.tm.t_reply(200, "OK");
              KSR.x.exit();
         end
    end
end
```

According to kamailio logs rtpengine modified the INVITE SDP, but I want to
add SDP to 200 OK response. How should I manage rtpengine to append SDP
answer to the 200 OK response?

The attached is the SIPp log, as you can see that last 200 OK doesn't
contain SDP.

Regards,
Ali
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20190611/4d1b1cab/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ue_invite.log
Type: text/x-log
Size: 4875 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20190611/4d1b1cab/attachment.bin>


More information about the sr-users mailing list