Summary: | ASTERISK-03193: Problem with quotes in System() | ||
Reporter: | Clod Patry (junky) | Labels: | |
Date Opened: | 2005-01-05 16:49:07.000-0600 | Date Closed: | 2011-06-07 14:04:51 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | I've this in my dialplan: exten => 3204,1,System(asterisk -rx'restart now'); exten => 3204,2,Playback(beep); which is transfered to: debian*CLI> show dialplan 3204@test_sip [ Context 'test_sip' created by 'pbx_config' ] '3204' => 1. System(asterisk -rxrestart now) [pbx_config] 2. Playback(beep) [pbx_config] -= 1 extensions (2 priorities) in 1 contexts. =- debian*CLI> into my dialplan, please remark there's no quotes. and this is the CLI output: -- Executing System("SIP/101-dee6", "asterisk -rxrestart now") in new stack -- Remote UNIX connection -- Remote UNIX connection disconnected -- Executing Playback("SIP/101-dee6", "beep") in new stack -- Playing 'beep' (language 'en') which the "restart now" doesn't occurs. ****** ADDITIONAL INFORMATION ****** I know, i could make a script like reboot.sh, and put my asterisk -rx'restart now' on it, but it wouldn't fix the problem with quotes. | ||
Comments: | By: Clod Patry (junky) 2005-01-05 16:52:44.000-0600 I can escape the ' with \ before each chars, like: exten => 3204,1,System(asterisk -rx\'restart now\'); exten => 3204,2,Playback(beep); which gives me: debian*CLI> show dialplan 3204@test_sip [ Context 'test_sip' created by 'pbx_config' ] '3204' => 1. System(asterisk -rx'restart now') [pbx_config] 2. Playback(beep) [pbx_config] -= 1 extensions (2 priorities) in 1 contexts. =- debian*CLI> and unfortunatly, the "restart now" occurs correctly. Is there a easy tweak to save us writing the escaping char before each '? If not, i think we can close this bug. Otherwise, it would be cool have this little tweak. edited on: 01-05-05 17:01 By: Mark Spencer (markster) 2005-01-05 17:03:11.000-0600 Nopers, that's how it's supposed to work :) |