Hi Timo
We had some issues changing the $rU as well.
In the end we wrote a perl function to do it:
sub rewrite_uri {
my $m = shift;
my $uri = shift;
$m->rewrite_ruri($uri);
return -1;
}
Which we call like so:
perl_exec("rewrite_uri", <value to set it to>);
If I recall correctly, our issue was that we could not pass in a variable,
an avp, or a concatenated string with kamailios rewrite uri function:
http://www.kamailio.org/wiki/cookbooks/4.2.x/core#rewriteuri
The function I just gave above however may be fixed now, it was a year or 2
ago we wrote the perl script.
I hope that helps.
All the best.
Will Ferrer
Switchsoft Inc
On Fri, Nov 28, 2014 at 10:05 AM, Timo Klecker <klecker(a)decoit.de> wrote:
Hi all!
Our Kamailio (3.1.4) crashed when modifying the username-Part of a Request
URI using:
$rU = $(rU{s.strip,6});
Initial Request URI:
/sbin/kamailio[40658]: NOTICE: <script>: [ INVITE ] Got new Packet to
sip:123456:pass@sip.custom.com
The config-script now removed the first 6 chars from the username part and
would replace them in one of the following lines, but Kamailio had problems
here:
/sbin/kamailio[40658]: ERROR: pv [pv_core.c:251]: failed to parse the R-URI
/sbin/kamailio[40658]: NOTICE: <script>: Strip from Head: Request
Username:
<null> // $rU
/sbin/kamailio[40658]: ERROR: pv [pv_core.c:251]: failed to parse the R-URI
/sbin/kamailio[40658]: ERROR: <core> [action.c:801]: ERROR: do_action: bad
uri <sip::passsip.custom.com>, dropping packet
Is there maybe a error when modifying a uri with password this way? Do we
have to change this?
Ultimately Kamailio crashed:
/sbin/kamailio[40658]: ERROR: <core> [action.c:1513]: run action error at:
:0
/sbin/kamailio[40658]: ERROR: pv [pv_core.c:1761]: do action failed
/sbin/kamailio[40658]: ERROR: <core> [lvalue.c:358]: setting pvar failed
/sbin/kamailio[40658]: ERROR: <core> [lvalue.c:411]: assignment failed at
pos: (319,10-319,34)
/sbin/kamailio[40658]: ERROR: pv [pv_core.c:251]: failed to parse the R-URI
Like 5000 lines more of
/sbin/kamailio[40658]: ERROR: pv [pv_core.c:251]: failed to parse the R-URI
Due to rerouting internal and trying to remove more parts of the request
Uri
using $rU = $(rU{s.strip,6});
Which then concluded to the following:
/sbin/kamailio[40656]: ALERT: <core> [main.c:741]: child process 40660
exited by a signal 11
/sbin/kamailio[40656]: ALERT: <core> [main.c:744]: core was generated
/sbin/kamailio[40656]: INFO: <core> [main.c:756]: INFO: terminating due to
SIGCHLD
/sbin/kamailio[40659]: ERROR: pv [pv_core.c:251]: failed to parse the R-URI
/sbin/kamailio[40682]: INFO: <core> [main.c:807]: INFO: signal 15 received
/sbin/kamailio[40677]: INFO: <core> [main.c:807]: INFO: signal 15 received
/sbin/kamailio[40676]: INFO: <core> [main.c:807]: INFO: signal 15 received
/sbin/kamailio[40678]: INFO: <core> [main.c:807]: INFO: signal 15 received
[...]
I will try to recreate this using the new version (4.1.6) on monday.
Kind regards
Timo Klecker
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users