On Aug 27, 2024, at 8:18 AM, Sergio Charrua via sr-users sr-users@lists.kamailio.org wrote:
Thanks Fred!
... but you’re really hacking kamailio to be an http api server...
Actually it will be a HTTP Client...kamailio will send requests to an HTTPS REST Service that requires authentication, returning a JWT token if authentication is OK. Then, with the Token, Kamailio will make another HTTPS Request to another endpoint of the REST Service to do some voodoo.... My issue is on how to handle, on Kamailio, the authentication JWT token returned from the REST Service.
I did consider having a Python script handling HTTP requests...might be the best solution, as it is (or seems to be....) more flexible in the long term....
Atenciosamente / Kind Regards / Cordialement / Un saludo,
Sérgio Charrua
In that case the htable model is a good one. You can set an expiration time on the htable entry to match the time of the token and then renew based on expiration.
KEMI might be a good choice as well (and handle it in python, ruby, whatever)
Regards,
Fred Posner