Thanks Hugh !

This is exactly what I needed.

On 04/11/2014 12:09 PM, Hugh Waite wrote:
Dan,

The uac_req_send() function uses values that have been set up in pseudo 
variables.
In the cfg file it would look like this (for example):

$uac_req(method) = "REGISTER"
$uac_req(ruri) = "sip:[email protected]"
$uac_req(furi) = "sip:[email protected]"
$uac_req(turi) = "sip:[email protected]"
$uac_req(ouri) = "sip:app_svr.example.com"
$uac_req(hdrs) = "Contact: $ct\r\nX-Custom-Hdr: abc123\r\n"
uac_req_send()

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.

sr.pv.sets("$uac_req(method)", "REGISTER")
sr.pv.sets("$uac_req(ruri)", 
"sip:[email protected]<mailto:sip:[email protected]>")
...
sr.modf("uac_req_send")

Regards,
Hugh

From: 
[email protected]<mailto:[email protected]>
 [mailto:[email protected]] On Behalf Of Daniel Ciprus
Sent: 11 April 2014 14:50
To: [email protected]<mailto:[email protected]>; Kamailio (SER) - Users Mailing 
List
Subject: Re: [SR-Users] LUA - UAC package implementation

uac_req() and uac_req_senf(). Is that doable with other functions ? Again, this 
has to be independent REGISTER (ISC interface functionality).
On 04/11/2014 06:16 AM, Daniel-Constantin Mierla wrote:
Hello,

what other functions do you need from uac module? uac_req_send() has no 
parameter and can be executed with sr.modf() from lua.

For functions with parameters, you would need to extend the lua api to be safe.

Cheers,
Daniel
On 11/04/14 05:54, Daniel Ciprus wrote:
Hi,

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.

thanks
Dan
--
Daniel Ciprus
Integration engineer
http://www.acision.com

9954 Mayland Dr
Suite 3100
Richmond, VA 23233
USA
T: +1 804 762 5601
E: [email protected]<mailto:[email protected]>

________________________________
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.





_______________________________________________

SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list

[email protected]<mailto:[email protected]>

http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



--

Daniel-Constantin Mierla - http://www.asipto.com

http://twitter.com/#!/miconda<http://twitter.com/#%21/miconda> - 
http://www.linkedin.com/in/miconda

--
Daniel Ciprus
Integration engineer
http://www.acision.com

9954 Mayland Dr
Suite 3100
Richmond, VA 23233
USA
T: +1 804 762 5601
E: [email protected]<mailto:[email protected]>

________________________________
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.


--
Daniel Ciprus
Integration engineer
http://www.acision.com

9954 Mayland Dr
Suite 3100
Richmond, VA 23233
USA
T: +1 804 762 5601
E: [email protected]<mailto:[email protected]>

________________________________
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.

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to