On Mon, Sep 22, 2014 at 10:46 AM, Tim Chubb <tim.ch...@voicesimplified.com> wrote:
> > Hi > > > > I was wondering if the following scenario is possible and if it is how I > would go about implementing it: > > > > I would like to be able read from a database a list of destinations > associated with a given dialled number which are tried in order of priority > with each destination having a user definable ring duration before the next > destination is tried. > > i.e. > > A Call is received from the PSTN, the number the caller dialled is looked > up, it has 3 destinations attached to it, the users deskphone which is > configured to ring for 10 seconds before the call is forwarded to their > Mobile phone with a ring duration of 15 seconds, which if unanswered would > be redirected to the main switchboard IVR. > > > > I think im looking for the equivalent of the Asterisk Dial app, where you > can specify a timeout as an argument, is this possible to do with > kamailio? All examples I have seen use a global timer value, which is > unsuitable for this requirement, as each user could define n failover > routes each with a distinct timeout before the next route is tried. > > > > Currently I have got as far as querying the database to retrieve the data > but im a bit stumped as to how to handle the timeout variable. > Set fr_inv_timer_avp module parameter: modparam("tm", "fr_inv_timer_avp", "$avp(my_fr_inv_timer)") Then put your database value into the avp. Tm module will time out after that many milliseconds and call your failure_route, where you can try the next destination or generate an error. http://kamailio.org/docs/modules/4.1.x/modules/tm.html#fr_inv_timer_avp Corey
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users