[asterisk-users] recreating extensions.conf from live dialplan ?

Steve Edwards asterisk.org at sedwards.com
Wed Apr 13 12:33:02 CDT 2016


On Wed, 13 Apr 2016, Steve Edwards wrote:

> // label
> 		if	('[' == substr($line, 5, 1))
> 			{
> 			$line = str_replace(']', '[', $line);
> 			$tokens = explode('[', $line);
> 			printf("\tsame = n(%s),\t\t\t%s", $tokens[1], $line);
> 			continue;
> 			}

Damn. Missed a line of code.

Should be:

// label
         	if      ('[' == substr($line, 5, 1))
 			{
                         $line = str_replace(']', '[', $line);
         		$tokens = explode('[', $line);
         		$line = substr($line, strpos($line, ' ', 20) + 1, 255);
         		printf("\tsame = n(%s),\t\t\t%s", $tokens[1], $line);
         		continue;
 			}

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
             https://www.linkedin.com/in/steve-edwards-4244281



More information about the asterisk-users mailing list