Koozali.org: home of the SME Server

custom app and "\n" sign..... HOWTO??

Offline bbialy

  • ***
  • 105
  • +0/-0
custom app and "\n" sign..... HOWTO??
« on: October 02, 2008, 02:34:28 PM »
I've got strange problem

i need to write custmo app wich part of it is the line

Code: [Select]
exten => _404XXXX,n,System(echo -e "Channel: SIP/${CALLERID(num)}\\nContext: outcall\\nExtension: 230" > /tmp/${UNIQUEID}.call)

but if i paset this code into custom app

in extenions.conf i've got


Code: [Select]
exten => _404XXXX,n,System(echo -e "Channel:SIP/${CALLERID(num)}
 Context:outcall\

Extension: 230" > /tmp/${UNIQUEID}.call)

i think that question is how to put \n sign as value into database selintra-work


bbialy
Reading with understanding is the hardest thing IN THE WORLD

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: custom app and "\n" sign..... HOWTO??
« Reply #1 on: October 03, 2008, 08:15:16 AM »
The parser is not smart enough to handle what you want to do.  I would suggest you move your system command into a bash or perl script and execute that from asterisk.  Bit of a pain but it's not economically viable to enhance the parser for such a rare request.

Kind Regards 

Offline bbialy

  • ***
  • 105
  • +0/-0
Re: custom app and "\n" sign..... HOWTO??
« Reply #2 on: October 03, 2008, 11:19:57 AM »
certainly,
i've made agi script which preparing call files

Maciej
Reading with understanding is the hardest thing IN THE WORLD