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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Iñaki Baz
Castillo
Sent: Thursday, August 09, 2007 12:18 PM
To: [email protected]
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 [EMAIL PROTECTED] ( 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
[EMAIL PROTECTED]
_______________________________________________
Users mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/users