Home

Resources

Products

Developers

Main • RoutingTips

Routing Tips

General advice

Watch your priorities. A numerically lower priority means a higher actual priority of the route.

Test your routes before going public. Calls may be routed through external providers instead on your network, and you may never notice. Actually, my DB had indicated that the call was setup directly (lines in use on source and destination both 1), but the call was routed via Voipstunt. Else you may have nasty surprises with your next bill ;-)

Regex-Routing

Ban not-registered users from calling numbers on your network. (Taken from this site)

 [default]
 ;Stop unauthorized calls.
 ${username}^$=-;error=noauth

Some test-routes. Starting with 000 - so no overlap with international / local area codes

 ;Route to the German Alice hotline, using voipstunt as provider (as set by line)
 ^0001$=sip/sip:00498004110411;line=voipstunt;

 ;Route to a madplay set up with some mp3 files, to test quality.
 ^0002$=moh/madplay

 ;Record something with 0007 and play it back with 00077. 
 ;The file will be overwritten on next call.
 ;Note the double slashes after record and play. Taken from online documentation; 
 ;in the regexroute.conf.sample there are only single slashes??
 ^0007$=wave/record//root/recordings/7.slin
 ^00077$=wave/play//root/recordings/7.slin

I use the full international format to assign unique numbers to my customers (Their fixed line numbers). If regexroute.conf has the highest actual priority, these customers always will be routed using the external provider. I could add rules to route them, by redirecting:

Redirecting Calls to another User in the Regex Module

In regexroute.conf:

 ^123456$=return;called=johndoe 

Routing priorities:

  • regexroute.conf: i.e. preroute=10 route=10
  • regfile.conf: i.e. preroute=50 route=50

YATE will start routing with regexroute.conf (highest priority, as it has the lowest number!). There the number 123456 matches, changes the called parameter to johndoe and returns. As the number has not been routed yet, YATE tries the files with the lower routing priority, now trying to route johndoe. johndoe is found in regfile.conf, and the originally called number 123456 is routed to the user johndoe.

Naturally, instead of regfile.conf you can use the database module (register.conf), with the priorities set accordingly.

Other stuff

My setup to route calls originating from Munich (089 in Germany 0049) over Voipstunt which takes international format 004989xxyz only.

I use Voipstunt to route calls to destinations not on my network.

 ^00\(.*\)$=sip/00\1;line=voipstunt;
 ^0\(.*\)$=sip/0049\1;line=voipstunt;
 ^\(.*\)$=sip/004989\1;line=voipstunt;

Note, how I used sip/ , not sip/sip: . I took this from the doc on routing to and from FWD on this site. Actually both may work, I haven't tested the other.

Routing with two providers (lines), alternating between them:

 ;Test setup: Deutsche Telekom Service
 ^000904$=sip/00498003301000;line=$(index,$idx904,voipstunt,webcalldirect);

 ;Routing international calls.
 ^00\(.*\)$=sip/00\1;line=$(index,$idx904,voipstunt,webcalldirect);

The purpose of this setup is to distribute the balance of the calls across the two providers; Also it gives callers the possibility to try again with a different provider (well both are Betamax actually, but ...)

Setting up outgoing number for each user:

 [default]
 ^9\(.*\)$=goto outgoing_trunk

 [outgoing_trunk]
 ${username}^1000$=;caller=123456
 ${username}^1001$=;caller=234561
 ^9\(.*\)$=h323/\1@xxx.xxx.xxx.xxx

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