[OpenSIPS-Users] problem with $rU

Rik Broers RBroers at motto.nl
Thu Apr 24 11:10:38 CEST 2014


Consider this answered! Found my error.

Vriendelijke groet,

Rik Broers
Voice Engineer
From: users-bounces at lists.opensips.org [mailto:users-bounces at lists.opensips.org] On Behalf Of Rik Broers
Sent: woensdag 23 april 2014 15:21
To: OpenSIPS users mailling list
Subject: [OpenSIPS-Users] problem with $rU

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/20140424/9e7fe7d9/attachment-0001.htm>


More information about the Users mailing list