<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Alexandro,</p>
<p>Unfortunately, you cannot do this in Python, but as you've
noticed you can use Lua or Perl.</p>
<p>Starting from OpenSIPS 3.1 though, it will be possible to call
OpenSIPS core script functions from Python, so 'pv_printf()' would
facilitate writing AVPs from Python.</p>
<p>Regards,<br>
</p>
<pre class="moz-signature" cols="72">Vlad Patrascu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 11/26/19 11:43 PM, Alexandro Conde
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:dcb527a7-8e90-4040-f72a-8dbf0c186cc5@perfectpitchtech.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<p>Hi all,</p>
<p>Is there a way to set a AVP variable from a Python script ?</p>
<p>I need to authenticate the endpoints with the username &
password stored and managed on other system DB, I already have
an API that can return the user information, so it will be
great to create a Python script that consume the API and return
the username & password on a AVP variable to do the
Authorization using the pv_www_authorize command.</p>
<p>I prefer to program that on Python but if it's not possible it
can be on LUA or Perl Right? (AVP_set & OpenSIPS::AVP)<br>
</p>
<p>Thanks in Advance !<br>
</p>
<div class="moz-signature">-- <br>
<table cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="vertical-align:top;width:1px;"> <img alt=""
src="cid:part1.4ED186E9.4FCD07F2@opensips.org"
style="max-width:60px;max-height:60px;margin-right:10px;"
class=""> </td>
<td>
<div><strong>Alexandro Conde Mtz.</strong></div>
<div>Voip Specialist & Developer</div>
</td>
</tr>
<tr>
<td colspan="2">
<div style="font-size:0.9em;border-top:1px dashed
rgb(246,145,29);min-width:250px;max-width:400px;margin-top:10px;padding-top:4px;">
<div> <a
style="color:rgb(246,145,29);margin-right:8px;"
href="mailto:aconde@perfectpitchtech.com"
moz-do-not-send="true">aconde@perfectpitchtech.com</a>
<a href="https://www.facebook.com/perfectpitchtech"
title="Facebook"
style="margin-right:8px;color:rgb(246,145,29);"
moz-do-not-send="true"> <img
src="cid:part3.C2FE5EBE.8E624B57@opensips.org"
alt="Facebook" class="" width="13" height="13">
</a> <a href="https://twitter.com/PerfectPitchTM"
title="Twitter"
style="margin-right:8px;color:rgb(246,145,29);"
moz-do-not-send="true"> <img
src="cid:part5.05A13A96.258288A2@opensips.org"
alt="Twitter" class="" width="13" height="13"> </a>
</div>
<div> <a
style="color:rgb(246,145,29);margin-right:8px;"
href="https://perfectpitchtech.com/"
moz-do-not-send="true">https://perfectpitchtech.com/</a>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</body>
</html>