Since it appears you're outputing to an html file, how about using the html break: <br> instead of CR? That should be effective if the resulting file will be viewed in a web browser.
Or leave your first line as is but call a bash (or other) script in the second line: 40000,2,System(/bin/bash /var/lib/asterisk/scripts/blank_line.sh) Whose whole purpose in life would be to append the new line. This keeps your variables tightly integrated with your dial plan as you've said is a goal. (Granted both options are a little hackish) As an aside, I find interesting to see some folks drawn to keeping as much logic processing in the dial plan itself with as little reliance on external scripts as possible versus others who more naturally gravitate to using external scripts as much as possible. Personally, I find myself leaning a little to the latter but there are lots of good arguments for the former approach. Sent from my BlackBerry device on the Rogers Wireless Network -----Original Message----- From: Bruce N <[email protected]> Date: Fri, 19 Jun 2009 16:12:06 To: <[email protected]>; asterisk Mailing<[email protected]> Subject: RE: [on-asterisk] Line Break with System() command Thanks for the input guys. It's easier to pass variables through the dial-plan than through bash script. \\n doesn't work. FreePBX deprecates one of the slashes. Also tried adding \\n from SSH and it adds but still no work. Also tried the following format which Duane suggested (double echo) and still no use: exten => 40000,1,System(/bin/echo -e "'LogON ${CHANNEL} ${EXTEN} ${EPOCH}'">> /var/www/html/raw/index.html)exten => 40000,2,System(/bin/echo -e "''">> /var/www/html/raw/index.html) Above example probably only adds a space and not a line break, hence, not working. Any other suggestions? Thanks -Bruce ---------------------------------------- > Date: Sat, 20 Jun 2009 02:38:06 +1000 > From: [email protected] > To: [email protected] > Subject: Re: [on-asterisk] Line Break with System() command > > Bruce N wrote: >> Hello, >> I am trying to add a line break after each line while using System() command >> in the dial-plan but it doesn't do. Any suggestions please? Currently I have >> this: >> exten => 100,n,System(/bin/echo -e "'LogON ${CHANNEL} ${EXTEN} ${EPOCH} >> \n'">> /var/www/html/rawData/index.html) > > did you try \\n ? > > Alternatively > > (echo .... && echo)>> ... > > Or > > echo ...>> ; echo ... > > -- > > Best regards, > Duane > > http://www.freeauth.org - Enterprise Two Factor Authentication > http://www.nodedb.com - Think globally, network locally > http://www.sydneywireless.com - Telecommunications Freedom > http://e164.org - Global Communication for the 21st Century > > "In the long run the pessimist may be proved right, > but the optimist has a better time on the trip." > _________________________________________________________________ Create a cool, new character for your Windows Live⢠Messenger. http://go.microsoft.com/?linkid=9656621 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
