Hi!
i wonder if there is a timer which controls the timeout for provisional replies.
E.g. I want to cancel an INVITE and retry another gateway if the gateway does not respond with 100 (or 180) in a certain time.
regards klaus
Hi Klaus,
You can use the fr_timer from the tm module: http://openser.org/docs/modules/1.1.x/tm.html#AEN108
If you don't get any reply from the far end, this timer will fire.
Regards, Ovidiu Sas
On 12/18/06, Klaus Darilion klaus.mailinglists@pernau.at wrote:
Hi!
i wonder if there is a timer which controls the timeout for provisional replies.
E.g. I want to cancel an INVITE and retry another gateway if the gateway does not respond with 100 (or 180) in a certain time.
regards klaus
-- Klaus Darilion nic.at
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Ovidiu Sas wrote:
Hi Klaus,
You can use the fr_timer from the tm module: http://openser.org/docs/modules/1.1.x/tm.html#AEN108
If you don't get any reply from the far end, this timer will fire.
I recently had a look at the timer related source code and that is what I wrote down:
- Each SIP transaction has a final response timer (FRT)
- SIP transactions fail (failure_route, status 408) when FRT fires
- TM module exposes final response timers (FRT) fr_timer and fr_inv_timer (can be set using AVP)
- INVITE transactions: FRT initially equals fr_timer and gets set to fr_inv_timer after receiving first provisional response
- setting fr_timer to a low value (e.g. 3s) allows for fast INVITE failover
So I'm setting fr_timer to a low value for local INVITE transactions. Local here means sessions between endpoints from our network domain. Something along the lines:
route[0] { if (method==INVITE) { # set fr_timer to 3 seconds avp_write("i:3", "$avp(fr_timer)"); # call FAILURE_DEFAULT_RELAY routing block on transaction failure t_on_failure("FAILURE_DEFAULT_RELAY"); t_relay(); exit; } } failure_route[FAILURE_DEFAULT_RELAY] { # status 408 ? transaction timed out if (t_check_status("408")) { # try next target if (ds_next_domain()) { t_relay(); } } }
- Christian
Regards, Ovidiu Sas
On 12/18/06, Klaus Darilion klaus.mailinglists@pernau.at wrote:
Hi!
i wonder if there is a timer which controls the timeout for provisional replies.
E.g. I want to cancel an INVITE and retry another gateway if the gateway does not respond with 100 (or 180) in a certain time.
regards klaus
-- Klaus Darilion nic.at
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Christian Schlatter wrote:
Ovidiu Sas wrote:
Hi Klaus,
You can use the fr_timer from the tm module: http://openser.org/docs/modules/1.1.x/tm.html#AEN108
If you don't get any reply from the far end, this timer will fire.
I recently had a look at the timer related source code and that is what I wrote down:
Each SIP transaction has a final response timer (FRT)
SIP transactions fail (failure_route, status 408) when FRT fires
TM module exposes final response timers (FRT) fr_timer and
fr_inv_timer (can be set using AVP)
- INVITE transactions: FRT initially equals fr_timer and gets set to
fr_inv_timer after receiving first provisional response
Hah! That's the important thing which I could not read from the docs.
thanks klaus
- setting fr_timer to a low value (e.g. 3s) allows for fast INVITE failover
So I'm setting fr_timer to a low value for local INVITE transactions. Local here means sessions between endpoints from our network domain. Something along the lines:
route[0] { if (method==“INVITE”) { # set fr_timer to 3 seconds avp_write("i:3", "$avp(fr_timer)"); # call FAILURE_DEFAULT_RELAY routing block on transaction failure t_on_failure("FAILURE_DEFAULT_RELAY"); t_relay(); exit; } } failure_route[FAILURE_DEFAULT_RELAY] { # status 408 ? transaction timed out if (t_check_status("408")) { # try next target if (ds_next_domain()) { t_relay(); } } }
- Christian
Regards, Ovidiu Sas
On 12/18/06, Klaus Darilion klaus.mailinglists@pernau.at wrote:
Hi!
i wonder if there is a timer which controls the timeout for provisional replies.
E.g. I want to cancel an INVITE and retry another gateway if the gateway does not respond with 100 (or 180) in a certain time.
regards klaus
-- Klaus Darilion nic.at
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Maybe the doc should be updated ... :-)
-ovi
On 12/18/06, Klaus Darilion klaus.mailinglists@pernau.at wrote:
Hah! That's the important thing which I could not read from the docs.
thanks klaus
Hi Christian!
Is the behavior identically for all transactions or is there a difference between INVITE and other transactions?
regards klaus
Christian Schlatter wrote:
Ovidiu Sas wrote:
Hi Klaus,
You can use the fr_timer from the tm module: http://openser.org/docs/modules/1.1.x/tm.html#AEN108
If you don't get any reply from the far end, this timer will fire.
I recently had a look at the timer related source code and that is what I wrote down:
Each SIP transaction has a final response timer (FRT)
SIP transactions fail (failure_route, status 408) when FRT fires
TM module exposes final response timers (FRT) fr_timer and
fr_inv_timer (can be set using AVP)
- INVITE transactions: FRT initially equals fr_timer and gets set to
fr_inv_timer after receiving first provisional response
- setting fr_timer to a low value (e.g. 3s) allows for fast INVITE failover
So I'm setting fr_timer to a low value for local INVITE transactions. Local here means sessions between endpoints from our network domain. Something along the lines:
route[0] { if (method==“INVITE”) { # set fr_timer to 3 seconds avp_write("i:3", "$avp(fr_timer)"); # call FAILURE_DEFAULT_RELAY routing block on transaction failure t_on_failure("FAILURE_DEFAULT_RELAY"); t_relay(); exit; } } failure_route[FAILURE_DEFAULT_RELAY] { # status 408 ? transaction timed out if (t_check_status("408")) { # try next target if (ds_next_domain()) { t_relay(); } } }
- Christian
Regards, Ovidiu Sas
On 12/18/06, Klaus Darilion klaus.mailinglists@pernau.at wrote:
Hi!
i wonder if there is a timer which controls the timeout for provisional replies.
E.g. I want to cancel an INVITE and retry another gateway if the gateway does not respond with 100 (or 180) in a certain time.
regards klaus
-- Klaus Darilion nic.at
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Klaus Darilion wrote:
Hi Christian!
Is the behavior identically for all transactions or is there a difference between INVITE and other transactions?
- INVITE transactions: FRT initially equals fr_timer and gets set to
fr_inv_timer after receiving first provisional response
This is only true for INVITE transactions, all other transactions only use the fr_timer. This makes sense since INVITE transactions normally involve user interaction (ringing).
The code responsible for that is in /modules/tm/t_reply.c, reply_received(..) function:
/* update FR/RETR timers on provisional replies */ if (msg_status < 200 && (restart_fr_on_each_reply || ((last_uac_status<msg_status) && ((msg_status >= 180) || (last_uac_status == 0))) ) ) { /* provisional now */ if (is_invite(t)) { /* invite: change FR to longer FR_INV, do not * attempt to restart retransmission any more */ backup_list = set_avp_list(&t->user_avps); if (!fr_inv_avp2timer(&timer)) { DBG("DEBUG:tm:reply_received: FR_INV_TIMER = %d\n", timer); set_timer(&uac->request.fr_timer, FR_INV_TIMER_LIST, &timer); t->flags |= T_NOISY_CTIMER_FLAG; } else { set_timer(& uac->request.fr_timer, FR_INV_TIMER_LIST, 0); } set_avp_list(backup_list); } else { /* non-invite: restart retransmissions (slow now) */ uac->request.retr_list = RT_T2; set_timer(&uac->request.retr_timer, RT_T2, 0); } } /* provisional replies */
- Christian
regards klaus
Christian Schlatter wrote:
Ovidiu Sas wrote:
Hi Klaus,
You can use the fr_timer from the tm module: http://openser.org/docs/modules/1.1.x/tm.html#AEN108
If you don't get any reply from the far end, this timer will fire.
I recently had a look at the timer related source code and that is what I wrote down:
Each SIP transaction has a final response timer (FRT)
SIP transactions fail (failure_route, status 408) when FRT fires
TM module exposes final response timers (FRT) fr_timer and
fr_inv_timer (can be set using AVP)
- INVITE transactions: FRT initially equals fr_timer and gets set to
fr_inv_timer after receiving first provisional response
- setting fr_timer to a low value (e.g. 3s) allows for fast INVITE
failover
So I'm setting fr_timer to a low value for local INVITE transactions. Local here means sessions between endpoints from our network domain. Something along the lines:
route[0] { if (method==“INVITE”) { # set fr_timer to 3 seconds avp_write("i:3", "$avp(fr_timer)"); # call FAILURE_DEFAULT_RELAY routing block on transaction failure t_on_failure("FAILURE_DEFAULT_RELAY"); t_relay(); exit; } } failure_route[FAILURE_DEFAULT_RELAY] { # status 408 ? transaction timed out if (t_check_status("408")) { # try next target if (ds_next_domain()) { t_relay(); } } }
- Christian
Regards, Ovidiu Sas
On 12/18/06, Klaus Darilion klaus.mailinglists@pernau.at wrote:
Hi!
i wonder if there is a timer which controls the timeout for provisional replies.
E.g. I want to cancel an INVITE and retry another gateway if the gateway does not respond with 100 (or 180) in a certain time.
regards klaus
-- Klaus Darilion nic.at
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Thanks for the info - I've updated the docs.
regards klaus
Christian Schlatter wrote:
Klaus Darilion wrote:
Hi Christian!
Is the behavior identically for all transactions or is there a difference between INVITE and other transactions?
- INVITE transactions: FRT initially equals fr_timer and gets set to
fr_inv_timer after receiving first provisional response
This is only true for INVITE transactions, all other transactions only use the fr_timer. This makes sense since INVITE transactions normally involve user interaction (ringing).
The code responsible for that is in /modules/tm/t_reply.c, reply_received(..) function:
/* update FR/RETR timers on provisional replies */ if (msg_status < 200 && (restart_fr_on_each_reply || ((last_uac_status<msg_status) && ((msg_status >= 180) || (last_uac_status == 0))) ) ) { /* provisional now */ if (is_invite(t)) { /* invite: change FR to longer FR_INV, do not * attempt to restart retransmission any more */ backup_list = set_avp_list(&t->user_avps); if (!fr_inv_avp2timer(&timer)) { DBG("DEBUG:tm:reply_received: FR_INV_TIMER = %d\n", timer); set_timer(&uac->request.fr_timer, FR_INV_TIMER_LIST, &timer); t->flags |= T_NOISY_CTIMER_FLAG; } else { set_timer(& uac->request.fr_timer, FR_INV_TIMER_LIST, 0); } set_avp_list(backup_list); } else { /* non-invite: restart retransmissions (slow now) */ uac->request.retr_list = RT_T2; set_timer(&uac->request.retr_timer, RT_T2, 0); } } /* provisional replies */
- Christian
regards klaus
Christian Schlatter wrote:
Ovidiu Sas wrote:
Hi Klaus,
You can use the fr_timer from the tm module: http://openser.org/docs/modules/1.1.x/tm.html#AEN108
If you don't get any reply from the far end, this timer will fire.
I recently had a look at the timer related source code and that is what I wrote down:
Each SIP transaction has a final response timer (FRT)
SIP transactions fail (failure_route, status 408) when FRT fires
TM module exposes final response timers (FRT) fr_timer and
fr_inv_timer (can be set using AVP)
- INVITE transactions: FRT initially equals fr_timer and gets set to
fr_inv_timer after receiving first provisional response
- setting fr_timer to a low value (e.g. 3s) allows for fast INVITE
failover
So I'm setting fr_timer to a low value for local INVITE transactions. Local here means sessions between endpoints from our network domain. Something along the lines:
route[0] { if (method==“INVITE”) { # set fr_timer to 3 seconds avp_write("i:3", "$avp(fr_timer)"); # call FAILURE_DEFAULT_RELAY routing block on transaction failure t_on_failure("FAILURE_DEFAULT_RELAY"); t_relay(); exit; } } failure_route[FAILURE_DEFAULT_RELAY] { # status 408 ? transaction timed out if (t_check_status("408")) { # try next target if (ds_next_domain()) { t_relay(); } } }
- Christian
Regards, Ovidiu Sas
On 12/18/06, Klaus Darilion klaus.mailinglists@pernau.at wrote:
Hi!
i wonder if there is a timer which controls the timeout for provisional replies.
E.g. I want to cancel an INVITE and retry another gateway if the gateway does not respond with 100 (or 180) in a certain time.
regards klaus
-- Klaus Darilion nic.at
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hello everybody,
I'm glad to announce the addition of a new module for OpenSER called "LDAP module". This module implements the following features:
* LDAP search function taking an LDAP URL as input * LDAP result parsing functions to store LDAP data as AVP * Support for accessing multiple LDAP servers * LDAP SIMPLE authentication * LDAP server failover and automatic reconnect * Configurable LDAP connection and bind timeouts * Module API for LDAP search operations that can be used by other OpenSER modules
The module implementation makes use of the open source OpenLDAP library available on most UNIX/Linux platforms. Besides LDAP server failover and automatic reconnect, this module can handle multiple LDAP sessions concurrently allowing to access data stored on different LDAP servers. Each OpenSER worker process maintains one LDAP TCP connection per configured LDAP server. This enables parallel execution of LDAP requests and offloads LDAP concurrency control to the LDAP server(s).
An LDAP search module API is provided that can be used by other OpenSER modules. A module using this API does not have to implement LDAP connection management and configuration, while still having access to the full OpenLDAP API for searching and result handling.
Since LDAP server implementations are optimized for fast read access, they are a good choice to store SIP provisioning data. Performance tests have shown that this module achieves lower data access times and higher call rates than other database modules like e.g. the OpenSER MYSQL module.
Module source code and documentation are available in OpenSER SVN trunk. The documentation including module installation instructions is also available in HTML format at:
http://www.openser.org/docs/modules/devel/ldap.html
This module has been in production use for several months at the University of North Carolina together with OpenLDAP LDAP servers (slapd). I welcome all to test this module in their environment in order to improve code quality, feedback is always appreciated.
cheers, Christian
El Monday 16 July 2007 17:12:07 Christian Schlatter escribió:
Hello everybody,
I'm glad to announce the addition of a new module for OpenSER called "LDAP module". This module implements the following features:
- LDAP search function taking an LDAP URL as input
- LDAP result parsing functions to store LDAP data as AVP
- Support for accessing multiple LDAP servers
- LDAP SIMPLE authentication
Is there planned a module ldap_auth to proxy authentication as mysql_auth and so?
Regards.
Hello,
On 07/17/07 10:31, Iñaki Baz Castillo wrote:
El Monday 16 July 2007 17:12:07 Christian Schlatter escribió:
Hello everybody,
I'm glad to announce the addition of a new module for OpenSER called "LDAP module". This module implements the following features:
- LDAP search function taking an LDAP URL as input
- LDAP result parsing functions to store LDAP data as AVP
- Support for accessing multiple LDAP servers
- LDAP SIMPLE authentication
Is there planned a module ldap_auth to proxy authentication as mysql_auth and so?
there is an auth_ldap on the tracker, but I think doesn't make sense to add it as the auth module can perform authentication taking the username and password from pseudo-variables (including AVP). So, the same functionality is achieved by loading username and password in AVPs using the ldap module, and perform authentication via auth module.
The ldap module has a lot of good stuff related to connection to server, failover, etc., and should be preferred to be used. I tried to start a tutorial about LDAP auth with OpenSER, should give you some hints to begin, contributions there are welcome.
Cheers, Daniel
Regards.
Daniel-Constantin Mierla wrote: ...
there is an auth_ldap on the tracker, but I think doesn't make sense to add it as the auth module can perform authentication taking the username and password from pseudo-variables (including AVP). So, the same functionality is achieved by loading username and password in AVPs using the ldap module, and perform authentication via auth module.
The ldap module has a lot of good stuff related to connection to server, failover, etc., and should be preferred to be used. I tried to start a tutorial about LDAP auth with OpenSER, should give you some hints to begin, contributions there are welcome.
I added some content to the existing LDAP auth tutorial, have a look at http://openser.org/dokuwiki/doku.php/tutorials:openser-auth-ldap.
I also tested the script example included in the tutorial and it worked fine for me. The new pv_xxx_authorize functions are really handy.
cheers, Christian
Thank you Cristian,
hope that the page will get soon to a step by step tutorial (including quick guidelines of how to install ldap server, ldap libraries; how to add data on ldap )command line tools, gui, ..).
Cheers, Daniel
On 07/27/07 20:53, Christian Schlatter wrote:
Daniel-Constantin Mierla wrote: ...
there is an auth_ldap on the tracker, but I think doesn't make sense to add it as the auth module can perform authentication taking the username and password from pseudo-variables (including AVP). So, the same functionality is achieved by loading username and password in AVPs using the ldap module, and perform authentication via auth module.
The ldap module has a lot of good stuff related to connection to server, failover, etc., and should be preferred to be used. I tried to start a tutorial about LDAP auth with OpenSER, should give you some hints to begin, contributions there are welcome.
I added some content to the existing LDAP auth tutorial, have a look at http://openser.org/dokuwiki/doku.php/tutorials:openser-auth-ldap.
I also tested the script example included in the tutorial and it worked fine for me. The new pv_xxx_authorize functions are really handy.
cheers, Christian
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users