For completeness I'll follow up with what I think is a bug:
I looked through the archives, and it seems that there
was a bug fix. So I updated my stuff to the released 1.1.0 code and
tried again, still the same problem.
So, I tried this:
avp_write("$rU","$avp(s:tmp_uri)");
avp_subst("$avp(s:tmp_uri)", "/;.*//");
avp_pushto("$ruri/username","$avp(s:tmp_uri)");
Which works.
I suspect there is a bug here somewhere. I would expect:
avp_write("$rU","$avp(s:tmp_uri)");
avp_pushto("$rU","$avp(s:tmp_uri)");
to work, but the pushto() gets a parse error on the $rU.
Aug 21 13:53:40 www openser[70435]: ERROR:avpops:fixup_pushto_avp:
unsupported destination "$rU"; expected $ru,$du,$br
Aug 21 13:53:40 www openser[70435]: ERROR: fix_actions: fixing
failed (code=-1) at cfg line 82
When both functions have $ruri/username as in:
avp_write("$ruri/username","$avp(s:tmp_uri)");
avp_pushto("$ruri/username","$avp(s:tmp_uri)");
The RURI gets 4 bytes longer, starting with sip:sip:
The hack I have using a mixture of $rU and $ruri/username works and
I'll leave it that way for now.
-g
On 8/21/06, Greg Fausak <[EMAIL PROTECTED]> wrote:
More along these lines...
When I run this sequence:
avp_write("$ruri/username","$avp(s:tmp_uri)");
avp_subst("$avp(s:tmp_uri)", "/;.*//");
avp_pushto("$ruri/username","$avp(s:tmp_uri)");
The resulting RURI looks like:
ERROR: parse_sip_msg_uri: bad uri
<sip:sip:[EMAIL PROTECTED]:[EMAIL PROTECTED]:5060>
Note the sip:sip:+XXXX header. What's the trick? The avp_subst is
effectively a no-op because the RURI doesn't contain the pattern. I think
I'd get the same result with:
avp_write("$ruri/username","$avp(s:tmp_uri)");
avp_pushto("$ruri/username","$avp(s:tmp_uri)");
-g
On 8/21/06, Greg Fausak <[EMAIL PROTECTED]> wrote:
> I want to use the RURI username in an avp query.
> I've seen a bunch of different ways to select it.
> Which way is correct?
>
> I am currently using $ruri/username, because I got an error with $rU.
>
> http://openser.org/docs/pseudo-variables.html shows '$rU', which
> complains when
> I try to reference that.
>
> Aug 21 06:55:58 www openser[89119]: ERROR:avpops:fixup_pushto_avp:
> unsupported destination "$rU"; expected $ru,$du,$br
> Aug 21 06:55:58 www openser[89119]: ERROR: fix_actions: fixing failed
> (code=-1) at cfg line 82
>
> It's weird, the source code in items.c reads:
>
> {{"ru", (sizeof("ru")-1)}, /* */
> { XL_RURI, 0, xl_get_ruri, {{0, 0}, 0}, {0, 0}}},
> {{"ruri", (sizeof("ruri")-1)}, /* */
> { XL_RURI, 0, xl_get_ruri, {{0, 0}, 0}, {0, 0}}},
> {{"rU", (sizeof("rU")-1)}, /* */
> { XL_RURI_USERNAME, 0, xl_get_ruri_attr, {{0, 1},
> 0}, {0, 0}}},
>
> Is there a list of the variables that are available in an avp operation?
>
> -g
>
>
--
Greg Fausak
[EMAIL PROTECTED]
--
Greg Fausak
[EMAIL PROTECTED]
_______________________________________________
Users mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/users