[OpenSIPS-Users] problem in dialplan
johan de clercq
johan at democon.be
Tue Jul 2 12:51:46 EDT 2019
Hang on, that I have changed already:
$var(i)=1;
if (dp_translate($var(i),"$ruri.user",$var(rU)))
The result is identical (sorry 😊).
As for the routing:
I do like this
Route
{
….
##initial INVITE
if (is_method("INVITE") && !has_totag())
{
…
if (is_registered("location"))
{
xlog("callid=$ci: Route[0]: the from user is registered, we go to callhandling");
route(callhandling);
}
Route[callhandling]
{
…
Route(normalizeforinbound);
….
}
Route[normalizeforinbound]
{
…
$var(i)=1;
if (dp_translate($var(i),"$ruri.user",$var(rU)))
{
xlog("callid=$ci: Route[normalizeforinbound]: we dropped 0,00,+ from $rU, result is var(rU) $var(rU)");
}
else
{
xlog("callid=$ci: Route[normalizeforinbound]: dp_translate failed!, we drop the call");
send_reply(404,"Unallocated Number");
exit;
}
…
}
BR,
From: Users <users-bounces at lists.opensips.org> On Behalf Of Liviu Chircu
Sent: Tuesday, July 2, 2019 6:44 PM
To: OpenSIPS users mailling list <users at lists.opensips.org>
Subject: Re: [OpenSIPS-Users] problem in dialplan
Are you sure this is the intended effect? Notice how that composite parameter of dp_translate()
has been split in two parameters in 3.0 [1]. To me, it looks like you should call:
... dp_translate(1, $ruri.user, $var(rU)) ...
To prevent other such errors with the rest of your script, please go through the 3.0 migration
document [2] and make sure to apply each change that's relevant to your script code.
Best regards,
[1]: https://opensips.org/html/docs/modules/3.0.x/dialplan.html#func_dp_translate
[2]: https://opensips.org/Documentation/Migration-2-4-0-to-3-0-0 <https://opensips.org/html/docs/modules/3.0.x/dialplan.html#func_dp_translate>
Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
On 02.07.2019 15:09, johan de clercq wrote:
This the code :
if (dp_translate(1,"$ruri.user/$var(rU)"))
{
xlog("callid=$ci: Route[normalizeforinbound]: we dropped 0,00,+ from $rU, result is var(rU) $var(rU)");
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20190702/296b44ab/attachment.html>
More information about the Users
mailing list