Actually I guess I could just do the following<br /><br />On the OpenSIPSProxy use the uac_replace_to() and change the domain to be the Primary Gateway and then if it fails I can use the uac_replace_to() and set the domain to the backup. And then on the OpenSIPSB2BUA look at the To domain and use that to set my $rd. I will have to test it out but that sounds like it would work.<br /><br />On , duane.larson@gmail.com wrote:<br />> On the OpenSIPSProxy script in order to pass the call to OpenSIPSB2BUA I set the $rd variable to the OpenSIPSB2BUA IP address. So what variable do I need to set on the OpenSIPSProxy before sending it to the OpenSIPSB2BUA so that the B2BUA server will know to send it to the Backup Gateway? I thought the $rd already set the RURI domain?<br />> <br />> <br />> <br />> On , Ovidiu Sas osas@voipembedded.com> wrote:<br />> > If you want to use opensips in b2b mode and still have failover, you<br />> > <br />> > will need to use two instances of opensips:<br />> > <br />> > - one in b2b mode,<br />> > <br />> > - one in proxy mode and doing the failover.<br />> > <br />> > It seems that you already have the setup, so all that you need to do<br />> > <br />> > on the proxy (on the failure case) is to send the INVITE back to the<br />> > <br />> > OpenSIPSB2BUA with RURI pointing to the Backup SIP Gateway B,<br />> > <br />> > <br />> > <br />> > <br />> > <br />> > Regards,<br />> > <br />> > Ovidiu Sas<br />> > <br />> > <br />> > <br />> > On Mon, May 16, 2011 at 10:04 PM, duane.larson@gmail.com> wrote:<br />> > <br />> > > I have the following setup<br />> > <br />> > ><br />> > <br />> > ><br />> > <br />> > > ----- Primary SIP Gateway A XXX.XXX.XXX.XXX<br />> > <br />> > > Phones OpenSIPSProxy OpenSIPSB2BUA SIP Trunk Provider |<br />> > <br />> > > ----- Backup SIP Gateway B YYY.YYY.YYY.YYY<br />> > <br />> > ><br />> > <br />> > > So my SIP trunk provider (Bandwidth.com) provided me with two gateways to<br />> > <br />> > > send my calls to (One is the primary and the other is the backup in case the<br />> > <br />> > > first doesn't work). I am trying to figure out how I can set up the<br />> > <br />> > > OpenSIPSB2BUA so that if the first gateway is down the call will timeout and<br />> > <br />> > > send the call to the Backup Gateway. Normally this would be easy but since<br />> > <br />> > > the call is being executed with the b2b_init_request() function I can't set<br />> > <br />> > > a failure route and then when the first call to the Primary Gateway fails<br />> > <br />> > > set my $rd to the Backup gateway and call b2b_init_request() since<br />> > <br />> > > b2b_init_request() can only be executed on the initial INVITE.<br />> > <br />> > ><br />> > <br />> > ><br />> > <br />> > > Has anyone run into this scenario yet? Anyone have any ideas on a possible<br />> > <br />> > > solution?<br />> > <br />> > ><br />> > <br />> > > If the OpenSIPSB2BUA can't do anything with the timeout then it will need to<br />> > <br />> > > fail back to the OpenSIPSProxy, but I am not sure what I can do on the<br />> > <br />> > > OpenSIPSProxy since all he does is set $rd to the IP Address of<br />> > <br />> > > OpenSIPSB2BUA and t_relay() it.<br />> > <br />> > > _______________________________________________<br />> > <br />> > > Users mailing list<br />> > <br />> > > Users@lists.opensips.org<br />> > <br />> > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users<br />> > <br />> > ><br />> > <br />> > ><br />> > <br />> > <br />> > <br />> > _______________________________________________<br />> > <br />> > Users mailing list<br />> > <br />> > Users@lists.opensips.org<br />> > <br />> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users<br />> >