[Serusers] Strange problem - SIP-->PSTN - 40 sec calls duration
deviator
deviator at inbox.ru
Thu Nov 3 07:50:45 CET 2005
Thanks for reply!
This is part of my openser.cfg
..........
route {
# ------------------------------------------------------------------------
# Record Route Section
# ------------------------------------------------------------------------
if (method=="INVITE" && client_nat_test("3")) {
setflag(7);
record_route_preset("212.212.212.212:5060;nat=yes");
} else if (method!="REGISTER") {
record_route_preset("212.212.212.212:5060");
};
......
# ------------------------------------------------------------------------
# Message Handler Logic
# ------------------------------------------------------------------------
if (loose_route()) {
append_hf("P-hint: Loose Routed\r\n");
if (has_totag() && (method=="INVITE" || method=="ACK")) {
if (isflagset(7) || search("^Route:.*;nat=yes")) {
setflag(6);
use_media_proxy();
};
};
route(1);
break;
};
if (uri!=myself) {
append_hf("P-hint: External Destination\r\n");
route(1);
break;
};
if (uri==myself) {
append_hf("P-hint: Local Destination\r\n");
if (method=="ACK") {
setflag(1);
route(9);
break;
} else if (method=="CANCEL") {
route(5);
break;
} else if (method=="INVITE") {
setflag(1);
route(5);
break;
} else if (method=="REFER") {
route(5);
break;
} else if (method=="REGISTER") {
setflag(1);
route(3);
break;
} else if (method=="OPTIONS") {
options_reply();
break;
} else if (method=="SUBSCRIBE") {
route(4);
break;
};
lookup("aliases");
if (uri!=myself) {
append_hf("P-hint: Alias External Destination\r\n");
route(1);
break;
};
if (!lookup("location")) {
sl_send_reply("404", "User Not Found");
break;
};
};
append_hf("P-hint: USRLOC Applied\r\n");
route(1);
}
route[1] {
remove_hf("Proxy-Authorization");
t_on_reply("1");
if (!t_relay()) {
if (method=="INVITE" || method=="ACK") {
end_media_session();
};
sl_reply_error();
};
}
route[2] {
# ------------------------------------------------------------------------
# Call Forwarding Reply Route Handler
# ------------------------------------------------------------------------
if (!lookup("location")) {
rewritehost("195.135.204.85"); # PSTN GW IP ADDRESSS GOES HERE
} else {
route(8);
route(1);
};
}
...........
...........
...........
route[7] {
# ------------------------------------------------------------------------
# PSTN Handler
# ------------------------------------------------------------------------
rewritehost("195.135.204.85"); # PSTN GW IP ADDRESSS GOES HERE
if (method!="CANCEL") {
if (!proxy_authorize("", "subscriber")) {
proxy_challenge("", "1");
break;
};
consume_credentials();
avp_write("i:45", "inv_timeout");
route(8);
};
t_on_failure("1");
route(1);
}
route[8] {
if (isflagset(6) || isflagset(7)) {
use_media_proxy();
};
}
........
onreply_route[1] {
if (isflagset(6) || isflagset(7) || search("212.212.212.212")) {
if (status=~"(180)|(183)|2[0-9][0-9]") {
if (!search("^Content-Length:\ +0")) {
append_hf("P-hint: NATed Reply\r\n");
use_media_proxy();
};
};
};
if (client_nat_test("1")) {
fix_nated_contact();
};
}
.........
I dont think that my UA is broken, same results have all my ipphones and softphones :(
-----Original Message-----
From: Andrei Pelinescu-Onciul <andrei at iptel.org>
To: deviator <deviator at inbox.ru>
Date: Wed, 2 Nov 2005 19:58:06 +0100
Subject: Re: [Serusers] Strange problem - SIP-->PSTN - 40 sec calls duration
>
> On Nov 02, 2005 at 18:48, deviator <deviator at inbox.ru> wrote:
> > Hello!
> >
> > When i'm trying to call from UA to PSTN i have a call failure after 40 sec. All my UA's (private and public ip) works fine when calling each other. Calls from PSTN ---> UA's also works fine. But when i'm calling to PSTN i may talk only 40 sec. I'm tried from NAT UA's and UA's with public ip, softphones and ipphones - same result. I don't know what to do, someone please help me.
>
>
> The ACK doesn't reach the gateway. Do you drop it in your ser.cfg?
> Anyway the UA seems broken, it uses strict routing, but it does not copy
> the entire uri from Record-Route:
>
> ACK sip:989099037259 at 212.212.212.212:5060;nat=yes
>
> for Record-Route:
> <sip:989099037259 at 212.212.212.212:5060;nat=yes;ftag=2245526517777;lr=on>.
>
>
> (notice the missing lr=on in the ACK uri).
>
>
> Andrei
>
> [...]
>
More information about the sr-users
mailing list