[SR-Users] Websocket kamailio.cfg doubt

Austin Einter austin.einter at gmail.com
Sun Mar 22 14:22:26 CET 2015


The README of websocket suggests to modify kamailio.cfg as below

















*# Handle requests within SIP dialogsroute[WITHINDLG] {        if
(has_totag()) {                # sequential request withing a dialog
should                # take the path determined by
record-routing                if (loose_route()) {
if ($du == "") {                                if (!handle_ruri_alias())
{                                        xlog("L_ERR", "Bad alias
<$ru>\n");                                        sl_send_reply("400", "Bad
Request");
exit;                                }
}                        route(RELAY);                } else
{                        if ( is_method("ACK") ) {...*

But the original script was














































*# Handle requests within SIP dialogsroute[WITHINDLG] {        if
(!has_totag()) return;        # sequential request withing a dialog
should        # take the path determined by record-routing        if
(loose_route()) {                route(DLGURI);                if
(is_method("BYE")) {                        setflag(FLT_ACC); # do
accounting ...                        setflag(FLT_ACCFAILED); # ... even if
the transaction fails                }                else if (
is_method("ACK") ) {                        # ACK is forwarded
statelessy                        route(NATMANAGE);
}                else if ( is_method("NOTIFY") ) {                        #
Add Record-Route for in-dialog NOTIFY as per RFC
6665.                        record_route();
}                route(RELAY);                exit;        }        if
(is_method("SUBSCRIBE") && uri == myself) {                # in-dialog
subscribe requests                route(PRESENCE);
exit;        }        if ( is_method("ACK") ) {                if (
t_check_trans() ) {                        # no loose-route, but stateful
ACK;                        # must be an ACK after a
487                        # or e.g. 404 from upstream
server                        route(RELAY);
exit;                } else {                        # ACK without matching
transaction ... ignore and discard
exit;                }        }        sl_send_reply("404","Not
here");        exit;}*
Now I have to include the websocket README suggested script in original
script. I am not finding logical way where shall I include websocket part.

Can somebody please help me.

Thanks
Austin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150322/c307bed7/attachment.html>


More information about the sr-users mailing list