Discussion:
[SR-Users] what language is using in kamailio.cfg
ANTHONY HESNAUX
2014-08-15 10:55:46 UTC
Permalink
hello every body,
I would like to know what language is using in Kamailio.cfg because I don’t arrive to create a loop
thank you
anthony
Daniel-Constantin Mierla
2014-08-15 11:30:01 UTC
Permalink
Hello,

it is a custom programming language (developed from scratch, started
back in 2001, tailored for SIP routing needs).

The only loop you can do for the moment is with 'while':

- http://www.kamailio.org/wiki/cookbooks/4.1.x/core#while

You can also simulate via recursive calling of sub-route blocks:

route[x] {
...
if(exp) route(x);
}

If you need something that is not possible with the structure of the
config file, look at using an embedded language interpreter (e.g.,
app_lua/perl/python/...). Here is an example of using Lua:

- http://kb.asipto.com/kamailio:usage:k32-lua-routing

Cheers,
Daniel
Post by ANTHONY HESNAUX
hello every body,
I would like to know what language is using in Kamailio.cfg because I don’t arrive to create a loop
thank you
anthony
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Next Kamailio Advanced Trainings 2014 - http://www.asipto.com
Sep 22-25, Berlin, Germany ::: Oct 15-17, San Francisco, USA
Daniel Tryba
2014-08-15 11:43:18 UTC
Permalink
Post by ANTHONY HESNAUX
hello every body,
I would like to know what language is using in Kamailio.cfg because I don’t
arrive to create a loop thank you
On
http://www.kamailio.org/wiki/cookbooks/4.1.x/core#script_statements
you can see the following control statements:

if/else
switch/case
while

They work just like you would expect from any C like parser.
--
POCOS B.V. - Croy 9c - 5653 LC Eindhoven
Telefoon: 040 293 8661 - Fax: 040 293 8658
http://www.pocos.nl/ - http://www.sipo.nl/
K.v.K. Eindhoven 17097024
Loading...