I'd like to think I'm not stupid, but I've been dealing with OpenSER for 2-3 years now and it still frustrates me just as much as it did the very first time I looked at it.
Can LCR do failover? I have this below. I can see that one of my gateways is selected, seemingly at random, and then when it doesn't reply (because I used a bogus IP), it doesn't time-out after 3s and go to the next gw. Is this possible? How do I do it?
Btw... can anyone recommend a book on OpenSER, since the documentation is so lacking?
modparam("tm", "fr_inv_timer_avp", "$avp(i:705)")
route{
$avp(i:705) = "3"; ...
if (!lookup("location")) { switch ($retcode) { case -1: case -3: t_newtran(); sl_send_reply("100","Trying"); if (!load_gws()) { sl_send_reply("500", "Internal server error, unable to load gateways"); exit; } if(!next_gw()){ sl_send_reply("503", "Service not available, no gateways found"); exit; }; route(1); }
}
route[1] {
if (is_method("INVITE")) { t_on_branch("2"); t_on_reply("2"); t_on_failure("1"); }
if (!t_relay()) { sl_reply_error(); }; exit; }
____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
Douglas Garstang writes:
I'd like to think I'm not stupid, but I've been dealing with OpenSER for 2-3 years now and it still frustrates me just as much as it did the very first time I looked at it.
douglas,
if you start like this, it does not encourage anyone to help you.
Can LCR do failover? I have this below. I can see that one of my gateways is selected, seemingly at random, and then when it doesn't reply (because I used a bogus IP), it doesn't time-out after 3s and go to the next gw. Is this possible? How do I do it?
Btw... can anyone recommend a book on OpenSER, since the documentation is so lacking?
here you cannot blame documentation, but yourself. you clearly are lacking any willingness to read existing openser documentation.
modparam("tm", "fr_inv_timer_avp", "$avp(i:705)")
route{
$avp(i:705) = "3";
tm module README has:
* fr_timer - this timer is used when no response was received yet. If there is no response after fr_timer seconds the timer triggers (and failure route will be executed if t_on_failure() was called). If a provisional response was received, the timer is set to fr_inv_timer for INVITE transactions, and RT_T2 for all other transactions. If a final reponse is received, the transaction has finished. * fr_inv_timer - this timer is used when a provisional reponse was received for an INVITE transaction.
if you had read it, you would not have used wrong timer variable.
-- juha