Re: [SR-Users] #!define and #!subst problem

2011-03-08 Thread Daniel-Constantin Mierla
Hello,

subst is replacing inside the sintring values, those being in between
quotes, like:

#subst /404/408/

sl_send_reply(404, Timeout)

The define is replacing ID tokes, which are alpha-numeric tokens stand
alone.

In your case, you try to replace inside a composite value, and the ip
address is not a stand alone token there - not sure if it supports, but you
try putting the value in between quotes. If does not work, then you have to
break down the listen value in listen with ip and then port separately.

Cheers,
Daniel

On Tue, Mar 8, 2011 at 1:13 PM, Klaus Darilion klaus.mailingli...@pernau.at
 wrote:

 Hi!

 I tried

 #!subst /IPADDRESS_VIRTUAL/83.136.32.161/
 listen=udp:IPADDRESS_VIRTUAL:5060

 and

 #!define IPADDRESS_VIRTUAL 83.136.32.161
 listen=udp:IPADDRESS_VIRTUAL:5060

 Both do not work - am I doing something wrong or is this a known
 limitation with listen statements?

 Thanks
 Klaus

 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




-- 
Daniel-Constantin Mierla
  http://www.asipto.com
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] #!define and #!subst problem

2011-03-08 Thread Klaus Darilion

Daniel-Constantin Mierla wrote:

Hello,

subst is replacing inside the sintring values, those being in between 
quotes, like:


#subst /404/408/

sl_send_reply(404, Timeout)

The define is replacing ID tokes, which are alpha-numeric tokens stand 
alone.


In your case, you try to replace inside a composite value, and the ip 
address is not a stand alone token there - not sure if it supports, but 
you try putting the value in between quotes. If does not work, then you 
have to break down the listen value in listen with ip and then port 
separately.


OK. So if I want to replace a pattern everywhere, inside strings and ID 
tokens, I have to use both (subst and define)?


I will try it,
Klaus

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users