<div dir="ltr"><div>How can i modify username before consuming credentials set in <b>$au</b> variable. I tried <span style="color:rgb(0,0,0)">$au=$_s("xyz:"+$au); but it says "</span><span style="color:rgb(0,0,0)"><b>read only pvar in assignment left side</b>"</span></div><div><span style="color:rgb(0,0,0)">ERROR: bad config file (1 errors)</span><br></div><div><div><span style="color:rgb(0,0,0)"><br></span></div><div><span style="color:rgb(0,0,0)"> I have also tried "</span><span style="color:rgb(0,0,0)"><b>rewriteuser("xyz:$au");</b></span><span style="color:rgb(0,0,0)">" but its not working.</span></div><br class="gmail-Apple-interchange-newline"></div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Regards,</div><div><br></div></div><div dir="ltr"><div style="font-family:sans-serif;font-size:small"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Prabhat</div><div dir="ltr"><br></div></div></div></div></div></div></div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 21, 2019 at 4:44 PM YASIN CANER <<a href="mailto:caner_yaso@hotmail.com">caner_yaso@hotmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hello,,</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
there is a lot way to remove a header. if it is just a Header , remove_hf() , if it  is value  then you can use exclude_hf_value().</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
load_credentials works after auth is done. check your configuration or please , share log.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<a href="http://kamailio.org/docs/modules/5.2.x/modules/textopsx.html#textopsx.f.exclude_hf_value" id="gmail-m_-7293825036704247672LPlnk281855" target="_blank">http://kamailio.org/docs/modules/5.2.x/modules/textopsx.html#textopsx.f.exclude_hf_value</a><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<a href="http://kamailio.org/docs/modules/5.2.x/modules/textops.html#textops.f.remove_hf" id="gmail-m_-7293825036704247672LPlnk283738" target="_blank">http://kamailio.org/docs/modules/5.2.x/modules/textops.html#textops.f.remove_hf</a><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Yasin CANER</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div id="gmail-m_-7293825036704247672LPBorder_GTaHR0cDovL2thbWFpbGlvLm9yZy9kb2NzL21vZHVsZXMvNS4yLngvbW9kdWxlcy90ZXh0b3BzLmh0bWwjdGV4dG9wcy5mLnJlbW92ZV9oZg.." class="gmail-m_-7293825036704247672LPBorder880612" style="width:100%;margin-top:16px;margin-bottom:16px;max-width:800px;min-width:424px">
<table id="gmail-m_-7293825036704247672LPContainer880612" style="padding:12px 36px 12px 12px;width:100%;border-width:1px;border-style:solid;border-color:rgb(200,200,200);border-radius:2px">
<tbody>
<tr valign="top" style="border-spacing:0px">
<td style="width:100%">
<div id="gmail-m_-7293825036704247672LPTitle880612" style="font-size:21px;font-weight:300;margin-right:8px;font-family:wf_segoe-ui_light,"Segoe UI Light","Segoe WP Light","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif;margin-bottom:12px">
<a id="gmail-m_-7293825036704247672LPUrlAnchor880612" href="http://kamailio.org/docs/modules/5.2.x/modules/textops.html#textops.f.remove_hf" style="text-decoration:none" target="_blank">textops Module - Kamailio</a></div>
<div id="gmail-m_-7293825036704247672LPDescription880612" style="font-size:14px;max-height:100px;color:rgb(102,102,102);font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif;margin-bottom:12px;margin-right:8px;overflow:hidden">
Check if the method of the message matches the name. If name is a known method (invite, cancel, ack, bye, options, info, update, register, message, subscribe, notify, refer, prack), the function performs method ID testing (integer comparison) instead of ignore
 case string comparison.</div>
<div id="gmail-m_-7293825036704247672LPMetadata880612" style="font-size:14px;font-weight:400;color:rgb(166,166,166);font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif">
<a href="http://kamailio.org" target="_blank">kamailio.org</a></div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<div>
<div id="gmail-m_-7293825036704247672appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_-7293825036704247672divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> sr-users <<a href="mailto:sr-users-bounces@lists.kamailio.org" target="_blank">sr-users-bounces@lists.kamailio.org</a>> on behalf of Prabhat Kumar <<a href="mailto:prabhat.kumar@myoperator.co" target="_blank">prabhat.kumar@myoperator.co</a>><br>
<b>Sent:</b> Monday, January 21, 2019 1:49 PM<br>
<b>To:</b> Kamailio (SER) - Users Mailing List<br>
<b>Subject:</b> Re: [SR-Users] Additional Param Check in ConsumeCredential Auth</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>I have used load_credentials for loading email, but not able to consume it. </div>
<div>
<pre style="color:rgb(0,0,0)">modparam("auth_db", "load_credentials", "$avp(email)=email_address")</pre>
</div>
<div>Also not able to access avp as it prints null </div>
<br clear="all">
<div>
<div dir="ltr" class="gmail-m_-7293825036704247672x_gmail_signature">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div>Regards,</div>
<div><br>
</div>
</div>
<div dir="ltr">
<div style="font-family:sans-serif;font-size:small">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div>Prabhat</div>
<div dir="ltr"><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
</div>
<br>
<div class="gmail-m_-7293825036704247672x_gmail_quote">
<div dir="ltr" class="gmail-m_-7293825036704247672x_gmail_attr">On Mon, Jan 21, 2019 at 12:40 PM YASIN CANER <<a href="mailto:caner_yaso@hotmail.com" target="_blank">caner_yaso@hotmail.com</a>> wrote:<br>
</div>
<blockquote class="gmail-m_-7293825036704247672x_gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hello</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
you can use load_credentials. After Auth is done , defined columns load to avp. and you can use it.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<a href="http://kamailio.org/docs/modules/5.2.x/modules/auth_db.html#auth_db.p.load_credentials" id="gmail-m_-7293825036704247672x_gmail-m_-8449579163797562704LPlnk869286" target="_blank">http://kamailio.org/docs/modules/5.2.x/modules/auth_db.html#auth_db.p.load_credentials</a><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Yasin CANER</div>
<div>
<div id="gmail-m_-7293825036704247672x_gmail-m_-8449579163797562704appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_-7293825036704247672x_gmail-m_-8449579163797562704divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> sr-users <<a href="mailto:sr-users-bounces@lists.kamailio.org" target="_blank">sr-users-bounces@lists.kamailio.org</a>>
 on behalf of Mojtaba <<a href="mailto:mespio@gmail.com" target="_blank">mespio@gmail.com</a>><br>
<b>Sent:</b> Monday, January 21, 2019 10:06 AM<br>
<b>To:</b> Kamailio (SER) - Users Mailing List<br>
<b>Subject:</b> Re: [SR-Users] Additional Param Check in ConsumeCredential Auth</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>Hello Prabhat, <br>
</div>
<div>Would you look at this function pv_www_authenticate in auth module? It seems it would be useful for you</div>
<div>You could use the email as authentication parameter too,</div>
<div>With Regards.Mojtaba<br>
</div>
<div><br>
</div>
</div>
<br>
<div class="gmail-m_-7293825036704247672x_gmail-m_-8449579163797562704x_gmail_quote">
<div dir="ltr" class="gmail-m_-7293825036704247672x_gmail-m_-8449579163797562704x_gmail_attr">On Mon, Jan 21, 2019 at 10:08 AM Prabhat Kumar <<a href="mailto:prabhat.kumar@myoperator.co" target="_blank">prabhat.kumar@myoperator.co</a>> wrote:<br>
</div>
<blockquote class="gmail-m_-7293825036704247672x_gmail-m_-8449579163797562704x_gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Hi,
<div><br>
</div>
<div>I want to check additional param in Auth module. For. ex., other than username and secret , i want to validate user by its email address. How can i do that?</div>
<div><br clear="all">
<div>
<div dir="ltr" class="gmail-m_-7293825036704247672x_gmail-m_-8449579163797562704x_gmail-m_-6169290856386082941gmail_signature">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div>Regards,</div>
<div><br>
</div>
</div>
<div dir="ltr">
<div style="font-family:sans-serif;font-size:small">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div>Prabhat Kumar</div>
<div dir="ltr"><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
<br clear="all">
<br>
-- <br>
<div dir="ltr" class="gmail-m_-7293825036704247672x_gmail-m_-8449579163797562704x_gmail_signature">--Mojtaba Esfandiari.S</div>
</div>
</div>
</div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
</div>
</div>
</div>

</blockquote></div>