<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="background-color: rgb(255, 255, 255); color: rgb(0, 0,
    0);" text="#000000" bgcolor="#FFFFFF">
Thanks Hugh ! <br>
<br>
This is exactly what I needed. <br>
<br>
<div class="moz-cite-prefix">On 04/11/2014 12:09 PM, Hugh Waite wrote:<br>
</div>
<blockquote style="border-left: 2px solid #009900 !important;
      border-right: 2px solid #009900 !important; padding: 0px 15px 0px
      15px; margin: 8px 2px;" cite="mid:009101cf55a0$734bf5c0$59e3e140$@crocodile-rcs.com" type="cite">
<!--[if !IE]><DIV style="border-left: 2px solid #009900; border-right: 2px solid #009900;  padding: 0px 15px; margin: 2px 0px;"><![endif]-->
<meta name="Generator" content="Microsoft Word 14 (filtered
        medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Dan,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">The uac_req_send() function uses values that have been set up in pseudo variables.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">In the cfg file it would look like this (for example):<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier
            New";color:#1F497D">$uac_req(method) = “REGISTER”<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier
            New";color:#1F497D">$uac_req(ruri) = “<a moz-do-not-send="true" href="sip:dan@example.com">sip:dan@example.com</a>”<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier
            New";color:#1F497D">$uac_req(furi) = “<a moz-do-not-send="true" href="sip:dan@example.com">sip:dan@example.com</a>”<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier
            New";color:#1F497D">$uac_req(turi) = “<a moz-do-not-send="true" href="sip:dan@example.com">sip:dan@example.com</a>”<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier
            New";color:#1F497D">$uac_req(ouri) = “sip:app_svr.example.com”<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier
            New";color:#1F497D">$uac_req(hdrs) = “Contact: $ct\r\nX-Custom-Hdr: abc123\r\n”<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier
            New";color:#1F497D">uac_req_send()<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">To do this is a LUA script, you need to set the PVs and then call the function. The “modf” LUA function can be used to call functions as if they were in the
 main configuration file.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier
            New";color:#1F497D">sr.pv.sets(“$uac_req(method)”, “REGISTER”)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier
            New";color:#1F497D">sr.pv.sets(“$uac_req(ruri)”, “<a class="moz-txt-link-abbreviated" href="mailto:sip:dan@example.com">sip:dan@example.com</a>”)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier
            New";color:#1F497D">…<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier
            New";color:#1F497D">sr.modf(“uac_req_send”)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hugh<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF
            1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext" lang="EN-US">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext" lang="EN-US">
<a class="moz-txt-link-abbreviated" href="mailto:sr-users-bounces@lists.sip-router.org">
sr-users-bounces@lists.sip-router.org</a> [<a class="moz-txt-link-freetext" href="mailto:sr-users-bounces@lists.sip-router.org">mailto:sr-users-bounces@lists.sip-router.org</a>]
<b>On Behalf Of </b>Daniel Ciprus<br>
<b>Sent:</b> 11 April 2014 14:50<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:miconda@gmail.com">miconda@gmail.com</a>; Kamailio (SER) - Users Mailing List<br>
<b>Subject:</b> Re: [SR-Users] LUA - UAC package implementation<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">uac_req() and uac_req_senf(). Is that doable with other functions ? Again, this has to be independent REGISTER (ISC interface functionality).
<o:p></o:p></p>
<div>
<p class="MsoNormal">On 04/11/2014 06:16 AM, Daniel-Constantin Mierla wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-left:1.5pt;margin-top:6.0pt;margin-right:1.5pt;margin-bottom:6.0pt">
<div style="border-top:none;border-left:solid #009900
            1.5pt;border-bottom:none;border-right:solid #009900
            1.5pt;padding:0cm 11.0pt 0cm
            11.0pt;margin-top:1.5pt;margin-bottom:1.5pt">
<p class="MsoNormal" style="margin-bottom:12.0pt">Hello,<br>
<br>
what other functions do you need from uac module? uac_req_send() has no parameter and can be executed with sr.modf() from lua.<br>
<br>
For functions with parameters, you would need to extend the lua api to be safe.<br>
<br>
Cheers,<br>
Daniel<o:p></o:p></p>
<div>
<p class="MsoNormal">On 11/04/14 05:54, Daniel Ciprus wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-left:1.5pt;margin-top:6.0pt;margin-right:1.5pt;margin-bottom:6.0pt">
<div style="border-top:none;border-left:solid #009900
                1.5pt;border-bottom:none;border-right:solid #009900
                1.5pt;padding:0cm 11.0pt 0cm
                11.0pt;margin-top:1.5pt;margin-bottom:1.5pt">
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi, <br>
<br>
How much of UAC package is implemented in LUA embedded module ? According to wiki seems like only "sr.uac.replace_from" is implemented. My goal is to "emulate" 3rd party registration by using UAC and LUA meaning that I will have to recreate register, tweak
 existing attributes and send it over to application server to process. <br>
<br>
thanks<br>
Dan<o:p></o:p></p>
<div>
<p class="MsoNormal">-- <br>
<b>Daniel Ciprus</b><br>
Integration engineer<br>
<a moz-do-not-send="true" href="http://www.acision.com">http://www.acision.com</a><br>
<br>
9954 Mayland Dr<br>
Suite 3100<br>
Richmond, VA 23233<br>
USA<br>
T: +1 804 762 5601<br>
E: <a moz-do-not-send="true" href="mailto:daniel.ciprus@acision.com">daniel.ciprus@acision.com</a><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div class="MsoNormal" style="text-align:center" align="center">
<hr size="2" width="100%" align="center">
</div>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:gray">This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject
 to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you for understanding.<br>
</span><br clear="all">
<br>
<br>
<br>
<o:p></o:p></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><o:p></o:p></pre>
</div>
</blockquote>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<pre>-- <o:p></o:p></pre>
<pre>Daniel-Constantin Mierla - <a moz-do-not-send="true" href="http://www.asipto.com">http://www.asipto.com</a><o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="http://twitter.com/#%21/miconda">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a><o:p></o:p></pre>
</div>
</blockquote>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">-- <br>
<b>Daniel Ciprus</b><br>
Integration engineer<br>
<a moz-do-not-send="true" href="http://www.acision.com">http://www.acision.com</a><br>
<br>
9954 Mayland Dr<br>
Suite 3100<br>
Richmond, VA 23233<br>
USA<br>
T: +1 804 762 5601<br>
E: <a moz-do-not-send="true" href="mailto:daniel.ciprus@acision.com">daniel.ciprus@acision.com</a><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div class="MsoNormal" style="text-align:center" align="center">
<hr size="2" width="100%" align="center">
</div>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:gray">This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject
 to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you for understanding.<br>
</span><br clear="all">
<o:p></o:p></p>
</div>
<!--[if !IE]></DIV><![endif]--></blockquote>
<br>
<div class="moz-signature">-- <br>
<b>Daniel Ciprus</b><br>
Integration engineer<br>
<a href="http://www.acision.com">http://www.acision.com</a><br>
<br>
9954 Mayland Dr<br>
Suite 3100<br>
Richmond, VA 23233<br>
USA<br>
T: +1 804 762 5601<br>
E: <a class="moz-txt-link-abbreviated" href="mailto:daniel.ciprus@acision.com">daniel.ciprus@acision.com</a><br>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="1">This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed
 to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you for understanding.<br>
</font>
<br clear=all> 
</body>
</html>