[OpenSIPS-Users] New User - Trying to use variables instead of IP no's
Matti Zemack
Matti.Zemack at rtcfactory.com
Thu Jan 22 11:04:02 CET 2009
Hi all,
I'm new to Opensips and love the speed of the code. Even in the VmWare
dev server I'm running on my (ancient) desktop machine!
As a first attempt at my new job I thought I could try and rewrite the
config-scripts used at my company so that one script easily could be
used in both dev and all the different Live environments.
Basically I could change a variable early in the opensips.cfg, and this
would assign the correct IP's for me to be used later in the config.
But I suspect I'm using Opensips variables in the wrong way...
Example of original code:
rewritehostport("10.0.1.100:5060");
Which I try changing to:
$var(GateWay_5060)="10.0.1.100:5060";
rewritehostport("$var(GateWay_5060)");
(This gives me runtime error: ERROR:tm:uri2proxy: bad host name in URI
<sip:$var(GateWay_5060)>)
Actually also tried rewritehostport($var(GateWay_5060)); which also
gives error: String expected...
So basically, I suppose I'm asking;
How can I cast variables in Opensips? Or should I do this some other,
smarter, way?
Thanks in advance,
Matti Zemack
Stockholm
Sweden
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20090122/45bd2d56/attachment.htm
More information about the Users
mailing list