Hello,

For non-commercial support please address our sr-users list (added to CC).

Please look at the uac module, there a function uac_auth() for this particular 
scenario with example cfg.

https://kamailio.org/docs/modules/5.5.x/modules/uac.html#uac.f.uac_auth

Cheers,

Henning

--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com<https://gilawa.com/>

From: Keshav Kaushik <[email protected]>
Sent: Sunday, August 28, 2022 1:34 PM
To: Henning Westerholt <[email protected]>
Subject: kamailio Trunk authentication

Respected Sir,
I am new to kamailio so not very familiar with config PV’s and transformations 
etc.
I have successfully authenticated the Twilio SIP phone via ACL.
But I also willing to authenticate the Twilio SIP via username and password.
For doing this I plan to modify the “proxy-authentication” header as blow:

if (is_present_hf("Proxy-Authorization")) {

            $nonc=$sel(proxy-authorization.nonce);// not working
            $has="kamailio:$ar:SdE-----------ADVpa";
            $ha1=$(has{s.md5});
            hat="$aa:$adu";
            $ha2=$(hat{s.md5});
            $resp="$HA1:$nonc:$HA2";
            append_hf('Proxy-Authorization: Digest username="kamailio", 
realm="$ar", nonce="$nonc", uri="sip:[email protected]", 
response="$(resp{s.md5})"');
}
            remove_hf("Proxy-Authorization");// remove original header

When I save the config file and restart kamailio, it does not start, may be due 
to some error in code.

Can you please help in authentication of a SIP trunk using user/passowrd.

Thanks in advance


Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to