Hello,
On 13.10.17 17:25, George Diamantopoulos wrote:
Hello,
In my script I've had to test for the user=phone parameter in URIs. I
thought uri_param() from siputils would be handy for this operation on
the RURI, so I did:
if ( !uri_param("user","phone") ) {
add_uri_param("user=phone");
}
Unfortunately this wouldn't work (uri_param returns -1), and I end up
with double user=phone params in the RURI.
I was able to work around this by changing the test to:
if ( !($(ru{uri.uparam}) == "phone") ) {
add_uri_param("user=phone");
}
But I wanted to ask if this is intentional or if I should file a bug
or something. Thanks.
according to the docs, uri_param() should work for this case. Can you
paste the first line of the request that fails with uri_param() function
so I can look at the code and see if there is any issue there?
Cheers,
Daniel
--
Daniel-Constantin Mierla
www.twitter.com/miconda --
www.linkedin.com/in/miconda
Kamailio Advanced Training, Nov 13-15, 2017, in Berlin -
www.asipto.com
Kamailio World Conference -
www.kamailioworld.com