<div class="gmail_quote">2009/6/5 Philipp Kempgen <span dir="ltr"><<a href="mailto:philipp.kempgen@amooma.de">philipp.kempgen@amooma.de</a>></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Tzafrir Cohen schrieb:<br>
<div class="im">> On Fri, Jun 05, 2009 at 06:50:05PM +0200, Philipp Kempgen wrote:<br>>> Tzafrir Cohen schrieb:<br>><br>>> > Specifically: '!' or '!command' in 'asterisk -r' shell runs a local<br>
>> > shell rather than a shell on the remote Asterisk process. It's not<br>>> > something that should even go over the wire.<br>>><br>>> > So you can just as well implement this on the remote side without<br>
>> > touching Asterisk's code :-)<br>>><br>>> In what scenario would I want to use "!" then?<br>><br>> If you're in a asteriskr shell and have no other terminal to run a<br>> command in.<br>
<br></div>I see. That makes sense.<br>
<div class="im"><br><br> Philipp Kempgen</div></blockquote></div>
<div>
<p>Thank you for the answers but unfortunately not everything is clear.<br>The originate issues the same with id -a:</p>
<p>[wait]<br>exten => _X.,1, Answer()<br>exten => _X.,n, Wait(${exten})</p>
<p>Action: Originate\r\n<br>Channel: <a href="mailto:Local/100@wait\r\n">Local/100@wait\r\n</a><br>Application: system\r\n<br>Data: id -a > /tmp/originate.txt\r\n\r\n</p>
<p>originate.txt:<br>uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)</p>
<p>Let me tell what was the purpose writing this patch.<br>The business requirement is to encode the recorded files in vorbis and then report the encoded file sizes.<br>Everything is controlled on the remote side which is a Windows service. I use the originate AMI command (Action: originate\r\nChannel: <a href="mailto:Local/100@wait\r\nApplication">Local/100@wait\r\nApplication</a>: system\r\nData: <my script> <params>\r\n\r\n) and the script stores the file sizes in astdb which is accessible and removable on the remote side.<br>
This method is a bit complicated. It would be easier to do it in one commad:</p>
<p>Action: Command\r\nCommand:!<my script> <params>\r\n\r\n<br>Response: Follows\r\n<output of the exectued command>--END COMMAND--\r\n\r\n</p>
<p>So I do not understand the security concerns, but there is a problem with this approach: it blocks the manager during the scripts executes.<br>Could it make sense if the answer would be asyncronous (or maybe the origniting is the best solution and amending this patch further is waste of time)?</p>
<p>An other thing to this. I do not trust in astdb too much. I sometimes read strange entries from the db at heavy load. These entries are fractions of other db entries.<br>Did anyone experinece the same?</p>
<p>Thanks,<br>Daniel</p>
<p> </p></div>