[Serusers] Dynamic failover using dummy sip registration?

Jan Janak jan at iptel.org
Sun Apr 18 18:55:27 CEST 2004


On 15-04 17:54, steve wrote:
> Hi,
> I have been testing an idea where a gateway failure will not rely on invite
> timeouts before a call is tried on another gateway.
> 
> The idea is that the gateways register with a user i.e. vgw1 this appears in
> usrloc, before I try to route that call to the gateway I lookup the user in
> usrloc, if it is not there I start a failure route.
>
> In the route statement I have the following:
> 
> if (uri=~"^sip:20[0-9]@10.96.1.48") {
>         route(2);
>         break;
> };
> 
> 
> route[2] {
>         #route to E2 PBX
>         log(1,"IM AT ROUTE 2");
>          lookup("vgw1");  # no registered contact

  The parameter of lookup function is the name of the table to search
  in, not the username to be looked up.
  
  If you want to lookup a specific username then you have to put it into
  the Request-URI of the message:

  setuser("vgw1");

  then do the lookup to verify that the gateway is up and running and
  after that call revert_uri() to recall the called number.

    Jan.




More information about the sr-users mailing list