Yate Community Forum

General Category => Yate based projects => Topic started by: Iqenas on November 11, 2018, 08:20:38 AM

Title: Where can I find the javascripts on YateBTS?
Post by: Iqenas on November 11, 2018, 08:20:38 AM
Hello! I have an YateBTS LabKit with Mageia 5. I used it in NiPC mode:calling from one phone to another and sending messages between them using WebGUI.
I would like to know where can I find the javascripts / files that allow me to modify different parameters directly from the console(for instance:ybts.conf,welcome.js,nipc.js etc).
I mentioned that I searched them in the console but did not find them.
Thanks !
Title: Re: Where can I find the javascripts on YateBTS?
Post by: Monica Tepelus on November 12, 2018, 07:12:37 AM
Hi Iqenas,

The .js files used by Yate/YateBTS are located in /usr/share/yate/scripts
The .conf files are in /etc/yate/sdr

Before doing any modifications please backup the content of the whole directory: both scripts and configurations.

YateBTS is an extension over Yate:
https://wiki.yatebts.com/index.php/About_YateBTS#YateBTS

In Labkit Yate runs as a service and is installed from packages. You can configure it from  /etc/yate/sdr  and add additional scripts in /usr/share/yate/scripts. It is quite rare for people to need to modify anything in the Yate code.  If you want to experiment with the C++ code of Yate you would need to download sources from svn, stop yate-sdr service and then run the downloaded version.
 
Title: Re: Where can I find the javascripts on YateBTS?
Post by: Iqenas on November 12, 2018, 12:29:34 PM
Thank you very much !
Title: Re: Where can I find the javascripts on YateBTS?
Post by: Iqenas on December 14, 2018, 05:30:09 AM
Hi! After I make a script and I put in /usr/share/yate/scripts what I have to do to run ?
How can i know if it runs ?
Thanks!
Title: Re: Where can I find the javascripts on YateBTS?
Post by: John on December 19, 2018, 02:43:46 AM
I think, but i'm not sure, you should load it,
add to  /usr/local/etc/yate/javascript.conf

scriptname=scriptname.js

under [scripts] section.

Title: Re: Where can I find the javascripts on YateBTS?
Post by: Monica Tepelus on January 07, 2019, 02:47:56 AM
Hi,

Yes, you need to add it to javascript.conf located with the other configuration files.
Then you should restart yate.

To check the script is running connect to with telnet:
telnet 0 5037
and then type "javascript"

You should get a list of the .js scripts running. Example:

bts_config = /usr/share/yate/scripts/bts_config.js
api_control = /usr/share/yate/scripts/sdr_control.js
calibrate = /usr/share/yate/scripts/calibrate.js
eliza = /usr/share/yate/scripts/eliza.js
roaming = /usr/share/yate/scripts/roaming.js