[Serusers] cancal
Sebastian Kühner
skuehner at veraza.com
Thu Aug 18 22:36:28 CEST 2005
Hi!
Thanks!
Here's some more of my code:
if (method=="INVITE") {
record_route();
setflag(1);
# First check the prefixes of the caller and change it to the specified
country-code in switch-admin --> Country-List
exec_dset('/usr/local/etc/ser/scripts/update_number.sh');
# Load first trunk
if (!load_gws())
{
sl_send_reply("500", "Internal server error, unable to load phone
gateways");
break;
}
if (!next_gw())
{
sl_send_reply("503", "Service not available, no gateways found");
break;
}
t_on_failure("2");
log(1, "-INVITE-\n");
};
[...]
t_relay();
Sebastian
----- Original Message -----
From: "Bayan William Towfiq" <william at telepacket.com>
To: "Sebastian Kühner" <skuehner at veraza.com>
Cc: <serusers at lists.iptel.org>
Sent: Thursday, August 18, 2005 3:39 PM
Subject: Re: [Serusers] cancal
> Hi Sebastian,
> Sorry about that, I misread the code. I will test your code and dig up
> an example of how I do it in my failure routes to show you.
>
> William
>
> Sebastian Kühner wrote:
>
> >Hi William,
> >
> >Thanks for your help.
> >
> >In my failover route I have the following code:
> >
> >failure_route[2] {
> > if (t_check_status("408|500|503"))
> > {
> > log (1, "next gateway...\n");
> > if (!next_gw())
> > {
> > t_reply("503", "Service not available, no more gateways");
> > break;
> > }
> > log (1, "gateway changed...\n");
> > t_on_failure("2");
> > t_relay();
> > }
> >}
> >
> >So the status is already filtered. I tried your code but without
result...
> >
> >Does anybody know how I can stop the failover timer?
> >
> >Thanks!
> >
> >Sebastian
> >
> >
> >
> >----- Original Message -----
> >From: "Bayan William Towfiq" <william at telepacket.com>
> >To: "Sebastian Kühner" <skuehner at veraza.com>
> >Cc: <serusers at lists.iptel.org>
> >Sent: Thursday, August 18, 2005 1:28 AM
> >Subject: Re: [Serusers] cancal
> >
> >
> >
> >
> >>Hi Sebastian,
> >>If the message is a cancel you it will have status 487
> >>
> >>so you can just add
> >>
> >> if (t_check_status("487")) {
> >> break;
> >> };
> >>
> >>before the rest of the code in the failure route. You can mail me
> >>privately if you have any more questions about this issue.
> >>
> >>William
> >>
> >>Sebastian Kühner wrote:
> >>
> >>
> >>
> >>>Hello,
> >>>
> >>>I'm using ser to forward to PSTN Gatways.
> >>>
> >>>Before the t_relay I put the command:
> >>>
> >>>t_on_failure("2");
> >>>
> >>>So, after a timeout ser goes to:
> >>>
> >>>failure_route[2] {
> >>> log (1, "next gateway...\n");
> >>> if (t_check_status("408|500|503"))
> >>> {
> >>> if (!next_gw())
> >>> {
> >>> t_reply("503", "Service not available, no more gateways");
> >>> break;
> >>> }
> >>> log (1, "gateway changed...\n");
> >>> }
> >>> t_on_failure("2");
> >>> t_relay();
> >>>}
> >>>
> >>>This is working very good... if the user doesn't make a hangup.
> >>>
> >>>If caller hangs up, the CANCEL hits SER and the call is cleanly
> >>>
> >>>
> >terminated.
> >
> >
> >>>SER however continues to failure_route after timeout of the initial
> >>>INVITE... ser sends out a new INVITE message to another PSTN-Server...
> >>>
> >>>
> >and
> >
> >
> >>>the phone rings (with nobody in the line)
> >>>
> >>>Many thanks for your help!
> >>>
> >>>Sebastian
> >>>
> >>>
> >>>
> >>>_______________________________________________
> >>>Serusers mailing list
> >>>serusers at lists.iptel.org
> >>>http://lists.iptel.org/mailman/listinfo/serusers
> >>>
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >
> >
> >
> >
>
>
>
More information about the sr-users
mailing list