[SR-Users] LUA - UAC package implementation

Hugh Waite hugh.waite at crocodile-rcs.com
Fri Apr 11 18:09:39 CEST 2014


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:dan at example.com"

$uac_req(furi) = "sip:dan at example.com"

$uac_req(turi) = "sip:dan at example.com"

$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:dan at example.com")

.

sr.modf("uac_req_send")

 

Regards,

Hugh

 

From: sr-users-bounces at lists.sip-router.org
[mailto:sr-users-bounces at lists.sip-router.org] On Behalf Of Daniel Ciprus
Sent: 11 April 2014 14:50
To: miconda at gmail.com; 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: daniel.ciprus at acision.com

 

  _____  

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
sr-users at lists.sip-router.org
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: daniel.ciprus at acision.com

 

  _____  

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.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20140411/63fba386/attachment.html>


More information about the sr-users mailing list