[OpenSIPS-Users] problem with $rU

Rik Broers RBroers at motto.nl
Wed Apr 23 15:20:45 CEST 2014


Hi,

On an ACK message i try to receive the rU value and put it in an AVP.

Is $rU not available on an ACK message or am I missing something else straightforward?

ERROR:core:do_assign: no value in right expression
ERROR:core:do_assign: error at line: 380
ERROR:core:parse_uri: bad uri,  state 0 parsed: <@int> (4) / <@internal.lan:5060> (24)

Line 380 is the following:
        $avp(s:orig_user) = $rU;


What happens after this is I replace the $rU with the result of a query and do a lookup location over it.
I then place back the original $rU  so the endpoint understands it.

For reference the block of code I'm having issues with.

        $avp(s:orig_user) = $rU;
        $ru = "sip:" + $avp(s:orig_user) + "@internal.lan:5060";
        lookup("location");
        if ($retcode == -1) {
                xlog("L_DEBUG", "Entering case -1\n");
                $avp(orig_user) = $rU;
                avp_db_query("select <stuff>","$avp(s:extension),$avp(s:d_trunk)");
                if ($avp(s:d_trunk)){
                        $rU = $avp(s:extension);
                }
                $ru = "sip:" + $rU + "@" + "internal.lan" + ":5060";
                lookup("location");
                $rU = $avp(orig_user);
                };
        record_route();
        force_send_socket(172.16.1.22);



Anyone an idea on what to try?



Vriendelijke groet,

Rik Broers
Voice Engineer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20140423/b3323ac8/attachment.htm>


More information about the Users mailing list