[OpenSIPS-Users] problem with pv string concatonation
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Wed Jul 29 19:33:44 CEST 2009
Hi Brett,
just tried the following piece of script:
xlog("1---------------------$rU\n");
$avp(s:lnp_prefix) = "buruburu";
$rU = $avp(s:lnp_prefix) + $rU;
xlog("2---------------------$rU\n");
sl_send_reply("404","Get lost");
exit;
and got:
Jul 29 20:32:03 [6233] DBG:core:parse_msg: SIP Request:
Jul 29 20:32:03 [6233] DBG:core:parse_msg: method: <INVITE>
Jul 29 20:32:03 [6233] DBG:core:parse_msg: uri:
<sip:bogdan at opensips.org>
Jul 29 20:32:03 [6233] DBG:core:parse_msg: version: <SIP/2.0>
Jul 29 20:32:03 [6233] DBG:core:parse_headers: flags=2
Jul 29 20:32:03 [6233] DBG:core:parse_via_param: found param type 232,
<branch> = <z9hG4bK30D3BEC2>; state=16
Jul 29 20:32:03 [6233] DBG:core:parse_via: end of header reached, state=5
Jul 29 20:32:03 [6233] DBG:core:parse_headers: via found, flags=2
Jul 29 20:32:03 [6233] DBG:core:parse_headers: this is the first via
Jul 29 20:32:03 [6233] DBG:core:receive_msg: After parse_msg...
Jul 29 20:32:03 [6233] DBG:core:receive_msg: preparing to run routing
scripts...
Jul 29 20:32:03 [6233] DBG:core:parse_headers: flags=100
Jul 29 20:32:03 [6233] DBG:core:get_hdr_field: cseq <CSeq>: <202> <INVITE>
Jul 29 20:32:03 [6233] DBG:core:parse_to: end of header reached, state=10
Jul 29 20:32:03 [6233] DBG:core:parse_to: display={},
ruri={sip:bogdan at opensips.org}
Jul 29 20:32:03 [6233] DBG:core:get_hdr_field: <To> [27];
uri=[sip:bogdan at opensips.org]
Jul 29 20:32:03 [6233] DBG:core:get_hdr_field: to body
[<sip:bogdan at opensips.org>
]
Jul 29 20:32:03 [6233] DBG:core:get_hdr_field: content_length=256
Jul 29 20:32:03 [6233] DBG:core:get_hdr_field: found end of header
Jul 29 20:32:03 [6233] DBG:maxfwd:is_maxfwd_present: max_forwards header
not found!
1---------------------bogdan
2---------------------buruburubogdan
Jul 29 20:32:03 [6233] DBG:core:parse_headers: flags=ffffffffffffffff
Jul 29 20:32:03 [6233] DBG:core:check_via_address: params 192.168.2.6,
192.168.2.6, 0
Jul 29 20:32:03 [6233] DBG:sl:run_sl_callbacks: callback id 0 entered
Jul 29 20:32:03 [6233] DBG:siptrace:trace_sl_onreply_out: trace off...
Jul 29 20:32:03 [6233] DBG:core:destroy_avp_list: destroying list 0xb561ba78
Jul 29 20:32:03 [6233] DBG:core:receive_msg: cleaning up
Which looks ok to me....testing the svn head..
Regards,
Bogdan
Brett Nemeroff wrote:
> Hey All,
>
> Weird problem here. This does not work:
> $rU = $avp(s:lnp_prefix) + $rU;
>
> When I do that, $rU appears "unchanged"
>
> But if I do:
> $rU = '' + $avp(s:lnp_prefix) + $rU;
>
> It works fine!
>
> Am I doing something wrong here?
>
> Thanks,
> Brett
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
More information about the Users
mailing list