Module "exec.so" provides the server with external scripting capabilities.
In your case, look at exec_dset ... relevant example usage is included
with the distribution: /ser-0.8.12/examples/exec_dist.cfg
Jamie
On Sat, 17 Jul 2004 13:50:36 +0200, Henrik Pfluger <ser(a)bellshare.com> wrote:
Hi,
We have several gateways all with the same routes. Anyone knows how to
distribute calls from SER in a round-robin or some random fashion to them.
The rewriteuri and forward functions only allow one static route.
It would be nice to have something like
rewriteuri_randomselect("sip:gateway1.pfluger.de:5060",
"sip:gateway2.pfluger.de:5060",
"sip:gateway3.pfluger.de:5060",
"sip:gateway4.pfluger.de:5060");
Any solution to this?
Thanks,
Henrik
This is what we currently do to send calls to a single gateway:
# PSTN resolution
if (uri=~"^sip:[0-9]+@") {
# request digest authorization
if ((method=="INVITE") &&
!www_authorize("pfluger.de", "customer"))
{ www_challenge("pfluger.de", "0");
break;
}
# make sure from user matches authenticated user
if (method=="INVITE") {
if (!check_from()) {
sl_send_reply("403", "From user does not match
authenticated user");
break;
}
}
# Forward PSTN call
xlog("L_CRIT","[%Tf]: %rm %ru: Forwarding to PSTN
gateway\n");
rewriteuri("sip:gateway.pfluger.de:5060");
}
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers
Jamie Yukes
Software Engineer
Global Connect Voice Broadcasting
http://www.gc1.com/