Yate Config
Install
Yate Install
Yate is a very flexible engine for routing messages. It's designed to run as everything from a large-scale SIP switch to an actual SIP client capable of running on a phone. The install is demonstrated Here.
To interoperate with OpenBTS, you'll need to install libgsm1-dev BEFORE building yate. Without this library installed, yate will not support the gsm codec and you will see the following message
<yrtp:WARN> Wrapper neither format nor payload specified [0x1b014b0]
To remedy this, install libgsm1-dev with the following command (on ubuntu)
sudo apt-get install libgsm1-dev
Then run the normal make/install scripts for yate.
svn checkout http://voip.null.ro/svn/yate/trunk yate cd yate sudo ./autogen.sh sudo ./configure sudo make sudo make install
You can confirm the gsm codec was successfully installed by seeing if the file "modules/gsmcodec.yate" exists.
You'll also need to ensure that yate was installed in the default location. Make sure that /usr/local/share/yate/scripts exists.
If you see the following error:
./yate error while loading shared libraries: libyate.so.4.3.1: cannot open shared object file: No such file or directory
Run the following command to remedy that:
export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH
Other Libraries
You'll need two libraries to route in yate. These are Python Messaging and libvbts. These follow the (well-established) python installation methodology.
Python Messaging:
git clone https://github.com/pmarti/python-messaging.git cd python-messaging sudo python setup.py install
libvbts:
git clone https://github.com/kheimerl/libvbts.git cd libvbts sudo python setup_yate.py install
Yate Configuration
There are a few files that have to be changed to configure yate with OpenBTS. These files are located in /usr/local/etc/yate/
ysipchan.conf
ysipchan configures the sip module. We need to tell it to generate SIP MESSAGE events.
In the [general] section, add the following:
[general] maxpkt=4096 generate=yes
And, in the [methods] block, add the following:
[methods] message=yes
regexroute.conf
regexroute.conf controls the routing of specific packets. We use regexroute.conf to disable the authorization of messages.
In the [extra] block...
[extra] ;skipping auth step user.auth=20
And the actual routing rule at the end of the file. Note that this block doesn't exist yet, you'll have to add it:
[user.auth] .*=return true
extmodule.conf
extmodule.conf controls external yate modules. libvbts implements a number of these that support OpenBTS. You'll need to turn these on.
In the [scripts] block:
[scripts] ;sip.message handlers VBTS_SMS_Provisioning.py=5 VBTS_SMS_Echo.py=10|vbts_tp_dest_address|^100$ VBTS_SMS_Route.py=50 ;call.route handlers VBTS_Route_Provisioning.py=5 VBTS_Route_Local.py=10
These variables set the priority of the message handlers and/or the regex that cause the message to be handled.
Permissions
For a number of services, yate requires write permissions to a DB's directory (not just the DB!) to modify a DBs content. This is because it uses a journaling system to maintain consistency. This shouldn't be a problem for the defauly install, but keep it in mind if DB access (e.g., provisioning) seem to fail.
OpenBTS configuration
There's only one openbts change required: You have to point OpenBTS at yate to cause it to handle messages. This is done from the OpenBTS command line (i.e. OpenBTSCLI):
config SIP.Proxy.SMS {YATE_IPADDRESS}:{YATE_PORT} #probably localhost:5060
config SIP.Proxy.Speech {YATE_IPADDRESS}:{YATE_PORT}
Run Yate
With the changes, yate should automatically route voice/sms messages. Run yate with
sudo yate
To test, try calling one of the numbers in regexroute.conf (such as 99991007).
RManager
RManager is Yate's CLI engine. It allows for Yate to be controlled by a simple telnet client. RManager can be accessed by running the following command (assuming it's running on localhost):
telnet localhost 5038
![(please configure the [header_logo] section in trac.ini)](http://wush.net/trac/rangepublic/raw-attachment/wiki/WikiStart/PublicReleaseLogo.png)
