Last week I ran into a similar thing with force_socket(). I was trying
to setup to force it out the second IP on the server and have it
generic for two load balanced servers. I did if ( $Ri == server 1's
IP ) { force_socket(server 1's second IP:5060); } else {
force_socket(server 2's IP:5060); }
I tried the fallowing and $var(z) looks
$var(x)=$tu;
$var(y) = $(var(x){s.select,1,-});
$var(z) = sip:+$var(y);
xlog($var(z));
rewriteuri($var(z));
This is what I get in the log
Feb 7 01:28:18 opensips /sbin/opensips[26561]: ERROR:core:parse_uri: bad
uri,
Why do you have the + outside of the quotation marks when you are declaring
var(z). Wonder if that is your issue. What is the output for your xlog
that shows what varz is?
Sent from Droid
On Feb 6, 2011 7:37 PM, Nigel Daniels nigel.dani...@connectandsell.com
wrote:
I tried the fallowing and
the '+ ' is for concatenation of the 2 strings and $var(z) prints correctly
in the log
On Sun, Feb 6, 2011 at 5:45 PM, Duane Larson duane.lar...@gmail.com wrote:
Why do you have the + outside of the quotation marks when you are declaring
var(z). Wonder if that is your issue. What is the
Nevermind I guess you do use the +. I don't have my config in front of me
so it looked odd. I would still be interested in what your xlog output is.
Sent from Droid
On Feb 6, 2011 7:37 PM, Nigel Daniels nigel.dani...@connectandsell.com
wrote:
I tried the fallowing and $var(z) looks
Feb 7 01:00:45 opensips /sbin/opensips[26040]:
sip:16505332...@sip.testdomain2.com
Nevermind I guess you do use the +. I don't have my config in front of me
so it looked odd. I would still be interested in what your xlog output is.
Sent from Droid
On Feb 6, 2011 7:37 PM, Nigel Daniels
He should search the mailing list for rewriteuri
You can't, i believe, use pseudovariables with that function. I believe you
have to use an avp
Sent from Droid
On Feb 6, 2011 8:26 PM, Tyler Merritt ty...@fonality.com wrote:
I do this as well:
$var(origFromNumber) = $(re{uri.user});
the problem is that rewriteuri() does not support variables is there any
alternative to rewriteuri() for changing the uri
On Sun, Feb 6, 2011 at 6:26 PM, Tyler Merritt ty...@fonality.com wrote:
I do this as well:
$var(origFromNumber) = $(re{uri.user});
$var(finalFromURI) = sip:81 +
Avpops
Sent from Droid
On Feb 6, 2011 8:34 PM, Nigel Daniels nigel.dani...@connectandsell.com
wrote:
the problem is that rewriteuri() does not support variables is there any
alternative to rewriteuri() for changing the uri
On Sun, Feb 6, 2011 at 6:26 PM, Tyler Merritt ty...@fonality.com
Isn't
$var(my_uri) = 5...@example.com;
$ru = sip: + $var(my_ruri);
the same as
rewriteuri(sip:5...@example.com);
just that using $ru you can use it just like assigning to other vars
like you are doing.
On Sun, Feb 6, 2011 at 6:36 PM, Duane Larson duane.lar...@gmail.com wrote:
Avpops
that seems to be working, thanks alot ! clearly I need to re-read the docs
On Sun, Feb 6, 2011 at 6:48 PM, Dave Singer dave.sin...@wideideas.comwrote:
Isn't
$var(my_uri) = 5...@example.com;
$ru = sip: + $var(my_ruri);
the same as
rewriteuri(sip:5...@example.com);
just that using $ru
I don't know that its mentioned in the documentation, but I ran across the
same issue and remembered finding something about it by searching nabble's
opensips part.
Its one of those things you chalk up to experience.
Sent from Droid
On Feb 6, 2011 8:54 PM, Nigel Daniels
12 matches
Mail list logo