[Asterisk-Users] string parsing in extensions.conf

Klaus Darilion klaus.mailinglists at pernau.at
Mon May 22 01:18:22 MST 2006


Hi!

I want to parse a string. In detail, after an ENUM lookup the SIP URI is 
stored in the variable enumresult. Now I want check if the domain part 
of the SIP URI matches a ceratin domain and if yes, replace it with 
another domain. E.g. I would like to do something like this:

	Set( pos = strpos( ${enumresult}, "@1.2.3.4"))
	if pos
	  Set(enumresult=${enumresult:0:${pos}}@5.6.7.8)

Is such string handling possible inside the dialplan?

Thanks
Klaus



More information about the asterisk-users mailing list