Hi Dmitri,

You can do this very simple with OpenSIPS/OpenSIP:

use the "registered" function ( see 
http://www.opensips.org/html/docs/modules/1.5.x/registrar.html#id271315) 
to check if the callee is registered with OpenSIPS or not.

Looking at the default OpenSIPS config file ( 
http://opensips.svn.sourceforge.net/viewvc/opensips/trunk/etc/opensips.cfg?revision=5795&view=markup)
 
, before the lookup part (  if (!lookup("location","m")) {  ):

    # if callee 1020 and is not registered, forward to 1030
    if ( $rU=="1020" && !registered("location") )  {
          #rU = "1030" ;
    }

    # do lookup with method filtering
    if (!lookup("location","m")) {


Of course, you can do such kind of redirects based on rules in DB (and 
not static in the script), by using the AVPOPS module 
(http://www.opensips.org/html/docs/modules/devel/avpops.html)


Regards,
Bogdan

Dmitri G. wrote:
> Hello,
>
> I would like to implement some kind of failover for my Asterisk, let 
> me describe how I would like to see it.
>
>
> I registered 2 sip users with my Kamailio, [email protected] 
> <mailto:[email protected]> and [email protected] <mailto:[email protected]>.
> I have added aliases to 1020 (aliases from 1...@domain com to 
> [email protected] <mailto:[email protected]>).
>
> Right now calls to 1020-1029 goes well to 1020, it works fine.
>
> But I would like to do the following:
>
> If 1020 isn't registered with Kamailio (let's say if registration for 
> 1020 is down in Kamailio, so AOR not found for 1020), it is possible 
> to route calls to 1030?
> So route calls to 1030 only when registration for 1020 isn't active in 
> Kamailio.
>
> I have tried manipulating with faillure_route, but without any luck.
>
>
> I hope it is clear what I would like to do :)
>
>
> Any help would be much appreciated.
>
>
> Kind regards,
>
> Dmitri
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to