[Users] Openser 1.1 and Dispatacher Failover
Douglas Garstang
dgarstang at oneeighty.com
Tue Jun 6 18:34:07 CEST 2006
Thanks Carsten. With your help, I think I got it working.
One final thing is that I'd like to log what's happening. What pseudo variable could I use in failure_route to show what destination I was trying?
Doug.
> -----Original Message-----
> From: Douglas Garstang
> Sent: Tuesday, June 06, 2006 10:09 AM
> To: Carsten Bock
> Cc: Users at openser.org
> Subject: RE: [Users] Openser 1.1 and Dispatacher Failover
>
>
> Thanks Carsten.
>
> What does ds_next_domain() do? Is failure_route[1] supposed
> to be calling itself? Why don't you call ds_next_dst() instead?
>
> Douglas.
>
> > -----Original Message-----
> > From: Carsten Bock [mailto:openser-list at qbiz.de]
> > Sent: Tuesday, June 06, 2006 9:47 AM
> > To: Douglas Garstang
> > Cc: Users at openser.org
> > Subject: Re: [Users] Openser 1.1 and Dispatacher Failover
> >
> >
> > Hi Douglas,
> >
> > It's quite simple. Here an except from a possible Main-Route:
> >
> > [...]
> > # Choose a Proxy (Round-Robin, PSTN-Gateways)
> > ds_select_domain("2", "4");
> >
> > # On Failure: Choose next Proxy
> > t_on_failure("1");
> >
> > # Relay to the Proxy
> > if (!t_relay()) {
> > sl_reply_error();
> > }
> > [...]
> >
> > And here the corresponding failure-route:
> > failure_route[1] {
> > # Choose another gateway
> > if (t_check_status("408")) {
> > if (ds_next_domain()) {
> > # On Failure: Choose next Proxy
> > t_on_failure("1");
> > # Relay to Proxy
> > t_relay();
> > } else {
> > t_reply("503", "Service not available");
> > return;
> > }
> > }
> > }
> >
> > And here the modparam for the dispatcher:
> > # Dispatcher: Enable Failover-Support
> > modparam("dispatcher", "flags", 2)
> > That's it.
> >
> > Carsten
> >
> > Douglas Garstang schrieb:
> > > Carston.
> > >
> > > Thanks for the info. Unfortunately, none of this stuff is
> > documented. I really don't have a clue how to implement any of this.
> > >
> > > Douglas.
> > >
> > >
> > >> -----Original Message-----
> > >> From: Carsten Bock [mailto:openser-list at qbiz.de]
> > >> Sent: Tuesday, June 06, 2006 9:34 AM
> > >> To: Douglas Garstang
> > >> Cc: Users at openser.org
> > >> Subject: Re: [Users] Openser 1.1 and Dispatacher Failover
> > >>
> > >>
> > >> Hi Douglas,
> > >>
> > >> Yes you're right, it does. You just cannot do a simple
> (stateless)
> > >> forward for failover, you need to establish a transaction (e. g.
> > >> t_relay()) and you need a failure-route handling the error
> > >> (if there is
> > >> any error). And don't forget the flags of the dispatcher
> > >> (Flag 2 needs
> > >> to be enabled).
> > >>
> > >> Carsten
> > >>
> > >> Douglas Garstang schrieb:
> > >>
> > >>> I was under the impression that the dispatcher module in
> > >>>
> > >> Openser 1.1 did failover?
> > >>
> > >>> I just tried it. I put an invalid IP in my dispatcher.list
> > >>>
> > >> file. When the dispatcher selects that invalid IP, it looks
> > >> like it never times out and tries another.
> > >>
> > >>> # PSTN
> > >>> 2 sip:216.187.140.217 # INVALID
> > >>> 2 sip:216.187.141.246
> > >>> 2 sip:216.187.140.216
> > >>>
> > >>> What special steps do I need to take to ensure the
> > >>>
> > >> dispatcher does failover?
> > >>
> > >>> Here's a piece of my openser.cfg file...
> > >>>
> > >>> #
> > >>> # Outgoing PSTN Calls - Dispatch to Audiocodes
> > >>> #
> > >>> if ( src_ip == 216.187.142.203 ||
> > >>> src_ip == 216.187.142.204 ||
> > >>> src_ip == 216.187.142.232 ||
> > >>> src_ip == 216.187.142.201 ||
> > >>> src_ip == 216.187.142.231 ) {
> > >>> sl_send_reply("100","Trying");
> > >>> xlog ("L_INFO","Outbound PSTN call. Dispatching
> > >>>
> > >> to Audiocodes");
> > >>
> > >>> ds_select_dst("2","0");
> > >>> forward();
> > >>> return;
> > >>> }
> > >>>
> > >>> Doug.
> > >>>
> > >>> _______________________________________________
> > >>> Users mailing list
> > >>> Users at openser.org
> > >>> http://openser.org/cgi-bin/mailman/listinfo/users
> > >>>
> > >>>
> > >>>
> > >>
> > >
> > >
> >
> >
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>
More information about the Users
mailing list