[Serusers] mutlple gw's/avpops

Christopher Crawford crawford_c at pannaway.com
Wed Feb 16 20:01:24 CET 2005


Hello Ramona,
We are attempting to use avpops and seem to be running into issues, using the latest stream from CVS.
 
We are trying to change the domain portion of the ruri with a set of routable gateways, using the serial forking example given in section 8.4 of your documentation (http://www.voice-system.ro/docs/avpops).
 
So here is what we want to do.  If a forwarded INVITE to gw1 fails, via a 404 or 408 response, use the next gw in the list, gw2, to route the request.  404 and 408s are noted because we do not want a retry if the response is a 486 - other other potential negative responses that are legitimate.  Below is a snippet from ser.cfg of what we have been working with, unsuccessfully. The difference between your example and what we are attempting to do is that the example demonstrates a method for rerouting to completely different URL.  We only want to change the domain portion of the ruri.
 
Kind regards, and thanks ahead of time for guidance offered.
 
Chris
 
 
modparam( "avpops","avp_aliases","serial_fork=i:665" )
...
avp_write( "33.145.243.53:5060", "$serial_fork" );
avp_write( "1.2.3.4:5060", "$serial_fork" );
...
 
route[5]
{
if ( avp_pushto( "$ruri", "$serial_fork" ) )
{
      log ( "\n\n\nsetting up failure route 9\n\n\n" );
      avp_delete( "$serial_fork" );
      t_on_failure( "9" );
      t_relay();
}
else
{
      log( "\n\n\nNo more gateways to push to\n\n\n" );
}
}/*end route[5]*/
...
failure_route[9]
{
    log ( "\n\n\ncalling failure route 9\n\n\n" );
    if ( avp_pushto( "$ruri/domain", "$serial_fork" ) )
    {
        avp_delete( "$serial_fork" );
        t_on_failure( "9" );
        t_relay();
    }
    else
    {
        log( "\n\n\nNo more gateways to push to\n\n\n" );
    }
}/*end failure route[9]*/
 
 
 


More information about the sr-users mailing list