[SR-Users] Websocket kamailio.cfg doubt

Daniel-Constantin Mierla miconda at gmail.com
Mon Mar 23 09:25:24 CET 2015


Hello,

you can keep the route[WITHINDLG] as it is in the default configuration
file, no need to update as in websocket readme. The current default one
is including the more or less the same logic, so it should just work.

Cheers,
Daniel

On 22/03/15 14:22, Austin Einter wrote:
> The README of websocket suggests to modify kamailio.cfg as below
>
> /*# Handle requests within SIP dialogs
> route[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 dialogs
> route[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
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150323/7ae38c71/attachment.html>


More information about the sr-users mailing list