Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
ref_manual:timers [2009/05/05 00:48] janakj |
ref_manual:timers [2012/02/18 05:07] 109.230.216.60 ghrcznaotzweTNUEQR |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== SIP Transaction Timers ====== | + | okay so anohter thing my sis needs. if only it would print out spreadsheets of all the daily activities. |
- | The timers of the tm module can be confusing and normally you do not have to | + | |
- | (or should) tweak timers except the `fr_inv_timer` (controlling "how long to | + | |
- | ring"). The table below gives an overview of the timers that can be changed | + | |
- | from SER configuration file and their relationship to the timer names in | + | |
- | RFC3261 and how/why you would want to change it. | + | |
- | + | ||
- | < | + | |
- | Starting in SER 2.0 the timer implementation has been completely | + | |
- | rewritten. The timers are now controlled in milliseconds and (not in seconds | + | |
- | as in SER 0.9), for example | + | |
- | + | ||
- | modparam(" | + | |
- | + | ||
- | Timers have a resolution of 1/ | + | |
- | ms. Thus, the timer can fire every 62.5 ms. Note that this also is the error | + | |
- | interval (they can fire anywhere in a 62.5 ms interval from their | + | |
- | " | + | |
- | </ | + | |
- | + | ||
- | ===== fr_timer ===== | + | |
- | This timer is used for all SIP requests. It hits if no reply | + | |
- | for an INVITE request or other request has been received (F in milliseconds). | + | |
- | If a provisional reply is received for an INVITE (any 1xx), then the | + | |
- | '' | + | |
- | are received before `fr_timer` hits, the transaction is terminated with a 408 | + | |
- | in failure route. | + | |
- | + | ||
- | See '' | + | |
- | generation of 408 vs. 408s received from the network etc. | + | |
- | + | ||
- | Intention of the RFC is having this value equal to the time required to send | + | |
- | seven requests. | + | |
- | + | ||
- | * **Corresponding RFC 3261 timers**: Timer F and Timer B | + | |
- | * **Default value**: 30000 ms | + | |
- | * **Example**: | + | |
- | + | ||
- | This timer can also be changed per transaction (INVITE) by calling | + | |
- | + | ||
- | t_set_fr(timer_fr_inv, | + | |
- | + | ||
- | in a route section of the configuration file. If one of the vaules is 0, the | + | |
- | corresponding timer won't be changed (e.g '' | + | |
- | '' | + | |
- | + | ||
- | ===== fr_inv_timer ===== | + | |
- | This is the timer which hits if no final reply for an INVITE arrives after a | + | |
- | provisional message was received (in milliseconds). This means that this timer | + | |
- | controls how long time a phone will ring before a 408 timeout is generated in | + | |
- | failure_route. Note that it will not always be the 108 reply that will be seen | + | |
- | in the failure_route as SER will choose a reply from all the replies received | + | |
- | on all the branches and the " | + | |
- | + | ||
- | * **Corresponding RFC 3261 timers**: Timer C | + | |
- | * **Default value**: 120000 ms | + | |
- | * **Example**: | + | |
- | + | ||
- | This timer can also be changed per transaction (INVITE) by calling | + | |
- | '' | + | |
- | file. If one of the vaules is 0, the corresponding timer won't be changed (e.g | + | |
- | '' | + | |
- | + | ||
- | The tm module parameter '' | + | |
- | '' | + | |
- | is 1 (yes). | + | |
- | + | ||
- | Setting the parameter to 0 is not RFC conformant but is very usefull for | + | |
- | dealing with phones | + | |
- | otherwise could make the transaction live forever or mess up your voicemail | + | |
- | activation. | + | |
- | + | ||
- | In the failure route, the new tm module functions: | + | |
- | - '' | + | |
- | - '' | + | |
- | - '' | + | |
- | - '' | + | |
- | + | ||
- | can be used to find out if the failure route is executed as a result of a | + | |
- | timeout (even if the selected reply is a 408, it could be something forwarded | + | |
- | from downstream and not a local timeout), and if it is a timeout, to find out | + | |
- | which kind (no reply or " | + | |
- | + | ||
- | if (!t_branch_timeout() && t_check_status(" | + | |
- | if (t_branch_timeout() && ! t_branch_replied()) ... # a local transaction timed out w/o any reply received. | + | |
- | if (t_branch_timeout() && t_branch_replied()) ... # a local timeout after some provsional reply. | + | |
- | + | ||
- | Even more script functions: | + | |
- | - '' | + | |
- | - '' | + | |
- | - '' | + | |
- | + | ||
- | For more information see the documentation of tm module. | + |