[SR-Users] Only a redirect server

James Cloos cloos at jhcloos.com
Tue Jun 24 19:56:51 CEST 2014


>>>>> "JS" == Jack Smith <jack.smith at yooz.com> writes:

JS> I would like to try only a redirect server.  I had a look at
JS> http://sourceforge.net/p/openser/code/HEAD/tree/trunk/examples/redirect.cfg
JS> which was friendly, but then the default file kamailio.cfg looked
JS> frightening !

The idea is to use that redirect.cfg *as* your kamailio.cfg.

You might want to change it to give an error on REGISTER instead of
OKing them.  And you need to change the uri in the append_branch()
call to the server to which you want to redirect, and edit or remove
the rewriteuri() call.

But the general concept of loading sl.so and calling append_branch()
and sl_send_reply() in route{} is most of what you need to know.

See:

http://www.kamailio.org/wiki/cookbooks/4.1.x/core#append_branch
http://www.kamailio.org/docs/modules/4.1.x/modules/sl.html

for details on append_branch() and sl_send_reply().

-JimC
-- 
James Cloos <cloos at jhcloos.com>         OpenPGP: 0x997A9F17ED7DAEA6



More information about the sr-users mailing list