Thank you Sir, I will try to implement this. I am highly impressed with your presentation at kamailio world 2021. I like to follow you, can you share me some more material for better knowledge of kamailio.

And how I can route requests from one ROUTE to another ie. From request_route to

 

Sent from Mail for Windows

 

From: Henning Westerholt
Sent: 29 August 2022 12:53 PM
To: Keshav Kaushik
Cc: Kamailio (SER) - Users Mailing List
Subject: RE: kamailio Trunk authentication

 

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

 

From: Keshav Kaushik <kdkaushik@gmail.com>
Sent: Sunday, August 28, 2022 1:34 PM
To: Henning Westerholt <hw@gilawa.com>
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:+1650ZZZZZZ@XX.YY.7.195", 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 for Windows