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 3rd
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();
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