How Can I Dynamically Change The INVITE Timer fr_invite?A common problem with VoIPi calls is that SIP-to-SIP calls require shorter INVITE message timers and do SIP-to-PSTNi. The INVITE timer controls how long SERi will wait for a response before replying with a "408 Request Timeout". If you have ever called a cellular telephone that was turned off, or otherwise unavailable, from a SIP phone SER will give a 408 response before the cellular telephone's voice mail system gets triggered. The result - you can't reach the voice mail of some PSTN users unless the INVITE timer is much longer (as long as 60 seconds). It is unreasonable to set the INVITE timer to 60 seconds if SIP-to-SIP calls, especially when caller and callee are on the same SIP proxy. In these cases the 408 timer could be as short as 20 seconds or so. So how can we dynamically change the INVITE timer based on the call destination? The answer is found in the AVPOPS module. With AVPOPS we can change the fr_inv_timer on the fly. The example below uses a default INVITE timer of 27 seconds. This is about 4 rings. However if request URIi (R-URI) matches a 10-digit numeric destination, then we will route the call to a PSTN gateway, but before doing so we use the avp_write() function to change the INVITE timer to 60 seconds. loadmodule "/usr/local/lib/seri/modules/avpops.so" |
Navigation |