Koozali.org: home of the SME Server

Obsolete Releases => SME VoIP (Asterisk, SAIL etc) => Topic started by: bbialy on October 02, 2008, 02:34:28 PM

Title: custom app and "\n" sign..... HOWTO??
Post by: bbialy 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
Title: Re: custom app and "\n" sign..... HOWTO??
Post by: SARK devs 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 
Title: Re: custom app and "\n" sign..... HOWTO??
Post by: bbialy on October 03, 2008, 11:19:57 AM
certainly,
i've made agi script which preparing call files

Maciej