[sr-dev] Use rtpengine lua question

Waite, Hugh hugh.waite at xura.com
Mon Oct 19 16:31:10 CEST 2015


Lua has the modf() function which allows calling any function that is available to the config file (http://www.kamailio.org/wiki/embeddedapi/devel/lua#srmodf). It has the limitation that it can't handle functions that require 'fixup' of the parameters, so you will have to try it out to see. It will show an ERROR level log "function 'rtpengine_manage' has fixup - cannot be used" if this is the case.

sr.modf("rtpengine_manage", "trust-address replace-session-connection ICE=force SRTP AVPF")

Regards,
Hugh

-----Original Message-----
From: sr-dev [mailto:sr-dev-bounces at lists.sip-router.org] On Behalf Of Victor Seva
Sent: 19 October 2015 14:10
To: sr-dev at lists.sip-router.org
Subject: Re: [sr-dev] Use rtpengine lua question

On 10/19/2015 02:54 PM, Yuriy Gorlichenko wrote:
> Hello. I want to rewrite some my configs by using lua scripts. At
> examples I saw that I can use constructions like
> sr.some_module.module_api("options")
> Can I use with this method rtpengine module api because many of
> projects that I have uses Webrtc and  use rtpengine and ofcourse I
> dont want "to jump" from config file to  scripts.

AFAIK rtpengine doesn't export any API to lua. So, no.

________________________________
This e-mail message may contain confidential, commercial or privileged information that constitutes proprietary information of Xura, Inc. or its subsidiaries. If you are not the intended recipient of this message, you are hereby notified that any review, use or distribution of this information is absolutely prohibited and we request that you delete all copies and contact us by e-mailing to security at xura.com. Thank You.



More information about the sr-dev mailing list