[OpenSER-Users] Why if (uri==myself) is always true? (aboutopenser call a number PSTN)
Martin.Gruber1 at infineon.com
Martin.Gruber1 at infineon.com
Thu Aug 9 13:01:41 CEST 2007
Hi,
I think there is an error in the config. You always execute route[1] first and the call is executed.
You should make in the invite query a differentiation between the numers that come in:
if (uri=~"^sip:[0-9]{10}@") {
xlog(" ---------------- Call to PSTN ---------------\n"); # <- DEBUG
route(4);
exit;
};
else {
if (!t_relay()) {
sl_reply_error();
};
exit;
}
-----Original Message-----
From: users-bounces at openser.org [mailto:users-bounces at openser.org] On Behalf Of Iñaki Baz Castillo
Sent: Thursday, August 09, 2007 12:18 PM
To: users at openser.org
Subject: Re: [OpenSER-Users] Why if (uri==myself) is always true? (aboutopenser call a number PSTN)
El Thursday 09 August 2007 11:59:08 zze-WU Yin RD-MAPS-LAN escribió:
> Hello everybody,
>
> I want that openser can call a PSTN number for example:
> 0296487631. But in the request of INVITE, I see that the callee is
> always 0296487631 at opensersip.test.machine ( and
> opensersip.test.machine is my sip server), that means the
> (uri==myself) is always ture. So this request of INVITE can not reache
> the gateway of PSTN.
Can't understand, your file has:
route[3] {
if (uri=~"^sip:[0-9]{10}@") {
xlog(" ---------------- Call to PSTN ---------------\n"); # <- DEBUG
route(4);
exit;
};
...
}
route[4] {
rewritehost("172.20.14.32");
route(1);
}
So the URI should be modified and you should see the xlog I've added above.
But of course note that the only is modified is the URI, and not the "To:"
field that doesn't change (and doesn't must it).
> Anybody can give me some advices?
First try adding that XLOG and test if it appears when calling to that number.
Regards.ç
--
Iñaki Baz Castillo
ibc at in.ilimit.es
_______________________________________________
Users mailing list
Users at openser.org
http://openser.org/cgi-bin/mailman/listinfo/users
More information about the Users
mailing list