[Spce-user] Dispactcher - causing kamailio proxy to think its offline
Jon Bonilla (Manwe)
manwe at sipdoc.net
Mon Jan 9 13:34:14 EST 2023
El Mon, 9 Jan 2023 09:41:43 -0800
Andy Clark <andyclark05251978 at gmail.com> escribió:
> I enabled dispatcher but after dispatcher sends the OPTION it causes
> kamailio proxy to think it's offline.
>
> MY_PUBLIC_IP:5060 > 127.0.0.1:5062
> OPTIONS>>>
> <<<100 Trying
> <<< 403 Domain not served here
>
>
> To fix the issue I had to comment out a few lines in the kamailio proxy cfg.
>
> kamailio.cfg.customtt.tt2
>
> + #}
> + #else if(is_method("OPTIONS")) # deny OPTIONS when R-URI is none of our
> IPs. ignore NOTIFY
> + #{
> + # sl_send_reply("403", "Domain not served here");
> + # xlog("L_NOTICE", "Sending reply S=403 Domain not served here M=$rm
> fs='«$Ri»:«$Rp»' du='«$si»:«$sp»' - [% logreq %]\n");
> + # route(ROUTE_EXIT);
> + #}
> sl_send_reply("200", "Alive");
> xlog("L_NOTICE", "Sending reply S=200 Alive M=$rm fs='«$Ri»:«$Rp»'
> du='«$si»:«$sp»' - [% logreq %]\n");
> route(ROUTE_EXIT);
> + #}
> + #else if(is_method("OPTIONS")) # deny OPTIONS when R-URI is none of our
> IPs. ignore NOTIFY
> + #{
> + # sl_send_reply("403", "Domain not served here");
> + # xlog("L_NOTICE", "Sending reply S=403 Domain not served here M=$rm
> fs='«$Ri»:«$Rp»' du='«$si»:«$sp»' - [% logreq %]\n");
> + # route(ROUTE_EXIT);
> + #}
>
>
> What is the correct way to solve this issue?
>
> In the UI I have added to IP address as a domain but that didn't make any
> difference.
> ngcp-status - shows everything is fine (hostname and FQDN and IP addresses
> are all showing correctly)
>
> Thanks
Haven't checked. A quick one would be to allow 403 as alive response although
it would be a quick patch and most probably what you want to achieve is having
a 200ok
check
https://kamailio.org/docs/modules/5.6.x/modules/dispatcher.html#dispatcher.p.ds_ping_reply_codes
--
PekePBX, the multitenant PBX solution
https://pekepbx.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: Firma digital OpenPGP
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20230109/b4d621a5/attachment.sig>
More information about the Spce-user
mailing list