Hello!
I was reading the documentation of Kamailio, And, although there are some authentication modules, I couldn't find a way to implement a custom authentication for SIP Register. Something that allows me, for example, to call a web server and returns if the user is authenticated, or the user data.
Am I missing anything? Do you know if it's possible to do this using another way?
Thanks João
Hi João,
It is certainly possible. Specifically, you can use values stored in pseudovariables for authentication challenges instead of going to the standard authentication database backing. Have a look at the pv_* functions in the `auth` module, e.g.
https://kamailio.org/docs/modules/5.1.x/modules/auth.html#auth.f.pv_auth_che...
Naturally, the values in these variables can be sourced from anywhere, including an API call to a web server. You can make that call using the `http_client` or `http_async_client` modules, for instance. You can even parse a JSON result using the `jansson` module.
-- Alex
On Thu, Nov 08, 2018 at 03:04:44AM -0200, João Sávio wrote:
Hello!
I was reading the documentation of Kamailio, And, although there are some authentication modules, I couldn't find a way to implement a custom authentication for SIP Register. Something that allows me, for example, to call a web server and returns if the user is authenticated, or the user data.
Am I missing anything? Do you know if it's possible to do this using another way?
Thanks João
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Many thanks!
Em qui, 8 de nov de 2018 às 03:12, Alex Balashov abalashov@evaristesys.com escreveu:
Hi João,
It is certainly possible. Specifically, you can use values stored in pseudovariables for authentication challenges instead of going to the standard authentication database backing. Have a look at the pv_* functions in the `auth` module, e.g.
https://kamailio.org/docs/modules/5.1.x/modules/auth.html#auth.f.pv_auth_che...
Naturally, the values in these variables can be sourced from anywhere, including an API call to a web server. You can make that call using the `http_client` or `http_async_client` modules, for instance. You can even parse a JSON result using the `jansson` module.
-- Alex
On Thu, Nov 08, 2018 at 03:04:44AM -0200, João Sávio wrote:
Hello!
I was reading the documentation of Kamailio, And, although there are some authentication modules, I couldn't find a way to implement a custom authentication for SIP Register. Something that allows me, for example,
to
call a web server and returns if the user is authenticated, or the user data.
Am I missing anything? Do you know if it's possible to do this using another way?
Thanks João
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users