[SR-Users] Routing logic and record-routing
Daniel-Constantin Mierla
miconda at gmail.com
Wed Jun 11 13:11:45 CEST 2014
Hello,
try to do record_route() for all SUBSCRIBE, PUBLISH and NOTIFY requests,
it might work for your UA.
Cheers,
Daniel
On 11/06/14 12:48, DURECU, OLIVIER (OLIVIER) wrote:
> Hello all,
> There is something I can’t understand using Kamailio as proxy to route
> SUBSCRIBE/NOTIFY dialogs between a client and a server
> I do record_route() on the first SUBSCRIBE received by Kamailio
> The next SUBSCRIBE is well handled by Kamailio in the [WITHIN_DIALOG]
> bloc but the 200/OK no more contains record-route header
> So the 3^rd SUBSCRIBE no more sets a relevant route and Kamailio
> rejets it with a 404 ?
> How to proceed so that 200/Ok within dialog still contains
> Record-route header ?
> Here are the piece of routing logic involved
> if (is_method("PUBLISH|SUBSCRIBE")) {
> record_route();
> $ru = "sip:192.168.0.250:6070";
> route(RELAY);
> exit;
> }
> And the as-is route[WITHINDLG] function
> route[WITHINDLG] {
> if (has_totag()) {
> # sequential request withing a dialog should
> # take the path determined by record-routing
> if (loose_route()) {
> #!ifdef WITH_WEBSOCKETS
> if ($du == "") {
> if (!handle_ruri_alias()) {
> xlog("L_ERR", "Bad alias
> <$ru>\n");
> sl_send_reply("400", "Bad Request");
> exit;
> }
> }
> #!endif
> route(RELAY);
> }
> Thanks for your help
> Olivier
>
>
> _______________________________________________
> 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://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20140611/4418faf3/attachment.html>
More information about the sr-users
mailing list