Home

Resources

Products

Developers

Main • WildfiresNotes

Getting started with Yate

When I first attempted to setup and configure YATE, I ran into a lot of problems. I was fortunate enough that the great people on #yate channel from irc.freenode.net server, were willing to assist me. Rather than let their helpfulness go to waste, I've compiled my questions and their answers into a set of crib notes that I hope can assist you as well.

Initial setup of YATE

There are many different yate to setup YATE. Compiling it yourself, using a distribution provided set of packages, etc. These notes are not dependant on how you have installed things.

Some initial assumptions

If you installed YATE from a package, familiarise yourself with the mechanism to restart it. After each configuration change you should restart the YATE server to be sure they have taken effect. If you have compiled YATE yourself, the ./run script in the compilation directory can be Ctrl-C'd to stop YATE.

Initial testing (of audio)

My usage sceanario is SIP devices calling into YATE and it determing where to send the call. So when I say "dial in", I've configured a SIP phone (in my case an actual SIP phone, but I assume you could also use a SIP softphone as well) to call my server. Initially I wanted to be sure that I had the hardphone and YATE working properly.

For me that means, I wanted to know that audio was properly functioning. The simplest way to do that was to play a tone whenever a call came in. The following line:

 
.*=tone/busy
 

located at the end of [default] section of the regexroute.conf file says:

whatever is coming in, send it to a busy signal.

When I attempted to "dial in" to the YATE server, I could see the SIP messages but I could not hear anything.

After some SIP call log analysis, it appeared that RTP was not being handled properly. Try modifying regexroute.conf to be:

 
${rtp_forward}possible=;rtp_forward=yes
.*=tone/busy
 

This worked for me and I was able to hear audio.

Modifying call information

My next task was to use YATE to route the SIP phone to another SIP device. In to properly do this, I had to modify the sending information. Initially the SIP message looked like (anonymised):

 
INVITE sip:voicemail@example.com SIP/2.0
From: "stuff" <sip:random@10.0.0.1>;tag=108375482
To: <sip:voicemail@example.com>
 

What I wanted to do, was change it into:

 
INVITE sip:voicemail@example.com SIP/2.0
From: <sip:originator@10.0.0.1>;tag=1402492972
To: <sip:voicemail@example.com>
 

To change "stuff" into something else, or remove it entirely, you can use the callername property. To change 'random' into 'originator' you set the caller property. Combining these together gives you:

 
^voicemail$=sip/sip:voicemail@example.com;caller=originator; \
callername=
 

which you can place in regexroute.conf

Slow devices

I discovered that a few times I'd call my voicemail machine and YATE would go ahead and cancel the session just prior to establishing it. It turned out that that the voicemail machine was somewhat loaded and things were not responding in time. For each call that YATE initiates, it starts two timers: maxcall and timeout.

Timeout runs for the overall length of the call. Whereas is maxcall is how long YATE will wait until the other side responds. Both parameters are in units of milliseconds. So, to wait up to 10 seconds before cancelling the call to the voicemail system, we can change our line in regexroute.conf to be:

 
^voicemail$=sip/sip:voicemail@example.com;caller=originator; \
callername=;maxcall=10000
 

Not letting things go on forever

Sometime the devices will be slow and sometimes the people using those devices will be slow (at talking). If you wish you can constrain the duration of a call as well. This is known as the timeout. So, to not let people leave voicemails longer than 180 seconds (3 minutes) you would have:

 
^voicemail$=sip/sip:voicemail@example.com;caller=originator; \
callername=;maxcall=10000,timeout=180000
 

A higher level view

If you been following along with the changes being made here, all to regexroute.conf by the way, you may have realised that the generic pattern in the file is:

 
pattern=target;param=value;param=value
 

The pattern is evaluated by the regex code and each paramter is then set and a routing call is made to the target. The first part of the target tells the regexmodule which router to contact.

Termination

So far, we've been playing tones and modifying calls coming through the system so that ended up in a voicemail server. That is interesting and useful but a telephony server, like YATE, can allow us to so much more. Like, connecting client to other parties. For this you need to be able to take a call and 'terminate' it closer to the person you want to call.

Termination might be to a VoIP provider, or it might be back out to the PSTN or, even, to a mobile phone. Often being able to terminate will require some exchange of many. If you'd like to test this out, but don't have money, I suggest you open a FWD account -- most of the below applies just as readily to a VoIP termination provider (like FWD) as it does to a PSTN termination provider.

Wherefor art thou, mine configuration?

When you installed YATE, there were a lot of configuration files installed (and possible samples) along with it. If your terminator requires you to authenticate to it, you will need to go to your configuration location (typically /etc/yate or /usr/local/etc/yate) and open up the file accfile.conf and enter in some details.

So you might have:

 
 [fwd]
 enabled=yes
 protocol=sip
 username=FWD_number
 password=FWD_password
 registrar=fwd.pulver.com
 

Obviously both FWD_number and FWD_password will be replaced will your own appropriate values. This configures a line you can use to route a call with.

If we jump back to the regexroute.conf file we can change it so that every call made to YATE goes to the FWD Talking clock. Like so:

 
.*=sip/sip:612;line=fwd
 

This says: for any incoming call, send it to 612 via the configuration we have for fwd.

Anyone calling will now get the FWD Talking clock.

3 May 2010:
Yate 3.0.0 alpha 3 released. Featuring the new Jabber server and wideband audio.
Download NOW

8 March 2010:
Yate 2.2 released. Mostly bug fixes. Dahdi compatible. Latest 2 release before 3.0.

6-7 February 2010:
Yate booth at FOSDEM 2010. Free CD with Freesentral available.

2 Nov 2009:
Yate 2.1 launched. Can replace a Cisco PGW2200 to control a Cisco AS54xx.

6 Aug 2008:
Yate and OpenSIPS (former OpenSER) join to build IP based clusters.

4 Aug 2008:
Yate 2 launched.

10 Jul 2008:
Yate presentation in Germany.

Feb 2008:
Yate 2.0.0 alpha 2 released. New routing module allows sending ENUM routed or forked calls to numbers of registered phones. More...

21 Jan 2008:
Yate 2 alpha released. Major changes, new ISDN, SS7 and MGCP stack. Added analogic and RBS support.

3 September:
Yate 1.3 released. Minor fixes and improvments mainly in client and SIP.

14 August:
Yate based ISDN passive recording system released by Trisys.

16 April:
Yate 1.2 released. Added Jingle and XML support, PBX improved.

25 September:
YateAdmin 1 released.

25 September:
Yate 1.1 released. Fallback routing from a database, fax support in Linux and bug fixes. Changelog and Download availables.

11 July 2006:
O'Reilly published an article about prototyping telephony applications with Yate and Python.

10 July 2006:
Yate 1 released. Includes YIAX, YSIP, YRTP and many new features.

June 1st 2006:
New Yate website launched


EditHistoryBacklinksRecent ChangesSearch