Hamid,
If your sip gateways respond with an error when they reach capacity then this is a fairly easy task. You would put a t_on_failure("1") just before your t_relay() to the gateway of choice. Something like:
t_on_failure("1"); rewritehostport("gatewayip:gatewayport"); if (!t_relay()) { sl_reply_error(); }
You would then write a function in your script like:
failure_route[1] { rewritehostport("backupip:backupport"); append_branch(); t_relay(); }
This will work assuming that your primary gateway at gatewayip returns an error if it can't make the outbound call.
I haven't used the dispatcher, so can't comment on that.
-g
On Jul 16, 2006, at 9:23 PM, Peter Childs wrote:
On Mon, 2006-07-17 at 01:20 +0330, Hamid Ali Asgari wrote:
I was wondering on OpenSER and came to a Question: How can call routing to SIP gateways be done based on their capacity? Lets say we have two SIP gateways each capable of handling 60 cuncurrent calls. How could I tell openser to forward the call number 61 to the next gateway? How would open ser know if the first gateway has free resources (previuos calls ended), and so on.
Personally I would use the dispatcher module to distribute your calls over both media gateways. You can always handle a failure response from one of the media gateways if it is full and try the next gateway.
Cheers, Peter
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users