Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] Lua to create gateway XML


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
steve.aubrey-bradshaw ...
Guest





PostPosted: Sat Nov 27, 2021 1:01 am    Post subject: [Freeswitch-users] Lua to create gateway XML Reply with quote

Hi,
I'm trying to use a Lua script to manage a list of SIP gateways on FreeSwitch that are stored in a mysql database.

I have a script that I can run from the CLI that prints out the correct XML and I've added the lines below to autoload_configs/lua.conf.xml

<param name="xml-handler-script" value="gateways.lua"/>
<param name="xml-handler-bindings" value="configuration"/>

However, nothing from the script is loading.

I suspect that I'm not returning the XML from the script correctly. I'm currently using stream:write

Does anyone have any experience with this?

Best Regards,
Steve

_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com
Back to top
dujinfang at gmail.com
Guest





PostPosted: Sun Nov 28, 2021 10:49 pm    Post subject: [Freeswitch-users] Lua to create gateway XML Reply with quote

not stream:write, you should return a XML_STRING = <xml>....

On Sat, Nov 27, 2021 at 1:39 PM Steve Aubrey-Bradshaw <steve.aubrey-bradshaw@pipcall.com (steve.aubrey-bradshaw@pipcall.com)> wrote:

Quote:
Hi,
I'm trying to use a Lua script to manage a list of SIP gateways on FreeSwitch that are stored in a mysql database.

I have a script that I can run from the CLI that prints out the correct XML and I've added the lines below to autoload_configs/lua.conf.xml

    <param name="xml-handler-script" value="gateways.lua"/>
    <param name="xml-handler-bindings" value="configuration"/>

However, nothing from the script is loading.

I suspect that I'm not returning the XML from the script correctly. I'm currently using stream:write

Does anyone have any experience with this?

Best Regards,
Steve

_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com (sales@freeswitch.com)
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com



--
About: http://about.me/dujinfang
Blog: http://www.dujinfang.com
Proj:  http://www.freeswitch.org.cn
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services