<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta name=Generator content="Microsoft Word 15 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Webdings;
        panose-1:5 3 1 2 1 5 9 6 7 3;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
pre
        {mso-style-priority:99;
        mso-style-link:"Pré-formatação HTML Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.Pr-formataoHTMLChar
        {mso-style-name:"Pré-formatação HTML Char";
        mso-style-priority:99;
        mso-style-link:"Pré-formatação HTML";
        font-family:Consolas;
        mso-fareast-language:PT-BR;}
span.EstiloDeEmail20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=PT-BR link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US'>De uma olhada nos logs de erro do PHP.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US'>Se o seu Asterisk está rodando através do usuário root, com certeza o httpd não vai conseguir executar o comando, pois não terá permissões pra isso.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US'>Ou permita acesso ao www-data no arquivo /var/run/Asterisk/Asterisk.ctl [Asterisk.conf] ou permite que o www-data execute o comando Asterisk via sudo ( O que pode ser uma péssima ideia e comprometer totalmente sua segurança ).<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US'>Print na saída do comando exec e com certeza vai ver a resposta de Permissão Negada.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Atenciosamente,</span><span style='font-family:"Tahoma","sans-serif";color:#1F497D'><br><img width=700 height=175 id="Imagem_x0020_1" src="cid:image001.png@01CEC5D9.68984DB0" alt="ass_fernando"><o:p></o:p></span></p><p class=MsoNormal><b><span style='font-size:18.0pt;font-family:Webdings;color:#538135;background:white'>P</span></b><b><span style='font-size:24.0pt;font-family:"Calibri","sans-serif";color:#538135;background:white'>&nbsp;</span></b><b><span style='font-size:7.0pt;font-family:"Tahoma","sans-serif";color:#538135;background:white'>Antes de imprimir&nbsp;pense em sua responsabilidade e &nbsp;compromisso com o&nbsp;Meio Ambiente!<br><br></span></b><i><span style='font-size:7.5pt;font-family:"Arial","sans-serif";color:black'><o:p></o:p></span></i></p><p class=MsoNormal><b><i><span style='font-size:6.5pt;font-family:"Arial","sans-serif";color:#1F4E79'>PT-BR: AVISO!</span></i></b><i><span style='font-size:6.5pt;font-family:"Arial","sans-serif";color:black'> A informação transmitida nesta mensagem é dedicada somente para o uso da pessoa endereçada e pode conter material confidencial e/ou privilegiado. <o:p></o:p></span></i></p><p class=MsoNormal><i><span style='font-size:6.5pt;font-family:"Arial","sans-serif";color:black'>Qualquer revisão, retransmissão, disseminação ou outro uso, ou a tomada de qualquer ação baseada nessas informações por pessoas não autorizadas é estritamente proibida. <o:p></o:p></span></i></p><p class=MsoNormal><i><span style='font-size:6.5pt;font-family:"Arial","sans-serif";color:black'>Se você recebeu esta mensagem por engano, por favor informe o remetente e imediatamente destrua todo o material e suas cópias. Obrigado.<br><br></span></i><span style='font-size:6.5pt;font-family:"Calibri","sans-serif";color:#2A2A2A'><o:p></o:p></span></p><p class=MsoNormal style='background:white'><b><i><span style='font-size:6.5pt;font-family:"Arial","sans-serif";color:#1F4E79'>EN-US: WARNING!</span></i></b><i><span style='font-size:6.5pt;font-family:"Arial","sans-serif";color:#222222'> The information transmitted is intended only for use by the addressee and may contain confidential and/or privileged material. <o:p></o:p></span></i></p><p class=MsoNormal style='background:white'><i><span style='font-size:6.5pt;font-family:"Arial","sans-serif";color:#222222'>Any review, re-transmission, dissemination or other use of it, or the taking of any action in reliance upon this information by persons and/or entities other than the intended recipient is prohibited. <o:p></o:p></span></i></p><p class=MsoNormal style='background:white'><i><span style='font-size:6.5pt;font-family:"Arial","sans-serif";color:#222222'>If you received this in error, please inform the sender and/or addressee immediately and delete the material.</span></i><i><span style='font-size:6.5pt;font-family:"Arial","sans-serif";color:black'>Thank you.</span></i><span style='font-size:6.5pt;font-family:"Arial","sans-serif";color:#222222'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><b><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>De:</span></b><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> asteriskbrasil-bounces@listas.asteriskbrasil.org [mailto:asteriskbrasil-bounces@listas.asteriskbrasil.org] <b>Em nome de </b>Eduardo Souza<br><b>Enviada em:</b> quinta-feira, 10 de outubro de 2013 16:41<br><b>Para:</b> asteriskbrasil@listas.asteriskbrasil.org<br><b>Assunto:</b> Re: [AsteriskBrasil] Asterisk PHP<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><o:p>&nbsp;</o:p></p><p style='margin-left:35.4pt'>Também já efetuei esse teste<o:p></o:p></p><div><p class=MsoNormal style='margin-left:35.4pt'>Em 10/10/2013 16:39, &quot;Mike Tesliuk&quot; &lt;<a href="mailto:mike@tesliuk.com">mike@tesliuk.com</a>&gt; escreveu:<o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><div><p class=MsoNormal style='margin-left:35.4pt'>não é recomendado isso.<br><br>tente especificar o caminho inteiro no comando &quot;/usr/sbin/asterisk......<br><br>Em 10/10/13 15:29, Eduardo Souza escreveu:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre style='margin-left:35.4pt'>Boa tarde Mike<o:p></o:p></pre><pre style='margin-left:35.4pt'><o:p>&nbsp;</o:p></pre><pre style='margin-left:35.4pt'><o:p>&nbsp;</o:p></pre><pre style='margin-left:35.4pt'>No caso já mudei o www-data para usuario root 0:0<o:p></o:p></pre><pre style='margin-left:35.4pt'><o:p>&nbsp;</o:p></pre><pre style='margin-left:35.4pt'>mesmo assim não funcionou<o:p></o:p></pre><pre style='margin-left:35.4pt'><o:p>&nbsp;</o:p></pre><pre style='margin-left:35.4pt'>abs<o:p></o:p></pre><pre style='margin-left:35.4pt'>Em 10/10/2013, às 16:26, Mike Tesliuk <a href="mailto:mike@tesliuk.com" target="_blank">&lt;mike@tesliuk.com&gt;</a> escreveu:<o:p></o:p></pre><pre style='margin-left:35.4pt'><o:p>&nbsp;</o:p></pre><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre style='margin-left:35.4pt'>você tem que dar permissão para o apache poder executar comandos no asterisk.<o:p></o:p></pre><pre style='margin-left:35.4pt'><o:p>&nbsp;</o:p></pre><pre style='margin-left:35.4pt'>se voce usa o apache apenas para estas coisas relacionadas ao asterisk a soluçãi mais pratica é trocar o usuaário de execução do apache para asterisk<o:p></o:p></pre><pre style='margin-left:35.4pt'><o:p>&nbsp;</o:p></pre><pre style='margin-left:35.4pt'>Em 10/10/13 15:20, Eduardo Souza escreveu:<o:p></o:p></pre><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre style='margin-left:35.4pt'>Boa tarde,<o:p></o:p></pre><pre style='margin-left:35.4pt'><o:p>&nbsp;</o:p></pre><pre style='margin-left:35.4pt'>Estou com um problema e não consegui achar onde está<o:p></o:p></pre><pre style='margin-left:35.4pt'><o:p>&nbsp;</o:p></pre><pre style='margin-left:35.4pt'>estou executando isso via linha de comando<o:p></o:p></pre><pre style='margin-left:35.4pt'><o:p>&nbsp;</o:p></pre><pre style='margin-left:35.4pt'># php5 index.php<o:p></o:p></pre><pre style='margin-left:35.4pt'><o:p>&nbsp;</o:p></pre><pre style='margin-left:35.4pt'>dentro desse arquivo está o seguinte código<o:p></o:p></pre><pre style='margin-left:35.4pt'><o:p>&nbsp;</o:p></pre><pre style='margin-left:35.4pt'><o:p>&nbsp;</o:p></pre><pre style='margin-left:35.4pt'>&lt;?<o:p></o:p></pre><pre style='margin-left:35.4pt'>exec('asterisk -x &quot;dongle sms modulo01 8888888 Insira sua mensagem aqui&quot;');<o:p></o:p></pre><pre style='margin-left:35.4pt'>?&gt;<o:p></o:p></pre><pre style='margin-left:35.4pt'><o:p>&nbsp;</o:p></pre><pre style='margin-left:35.4pt'>Via shell ele envia a mensagem normalmente<o:p></o:p></pre><pre style='margin-left:35.4pt'><o:p>&nbsp;</o:p></pre><pre style='margin-left:35.4pt'>Quando vou via browser <a href="http://%3cip%3e/index.php">http://&lt;ip&gt;/index.php</a><o:p></o:p></pre><pre style='margin-left:35.4pt'><o:p>&nbsp;</o:p></pre><pre style='margin-left:35.4pt'>o mesmo não envia, alguem pode me ajudar?<o:p></o:p></pre><pre style='margin-left:35.4pt'><o:p>&nbsp;</o:p></pre><pre style='margin-left:35.4pt'><o:p>&nbsp;</o:p></pre><pre style='margin-left:35.4pt'>abs<o:p></o:p></pre><pre style='margin-left:35.4pt'><o:p>&nbsp;</o:p></pre><pre style='margin-left:35.4pt'>Eduardo<o:p></o:p></pre><pre style='margin-left:35.4pt'>_______________________________________________<o:p></o:p></pre><pre style='margin-left:35.4pt'>KHOMP: completa linha de placas externas FXO, FXS, GSM e E1;<o:p></o:p></pre><pre style='margin-left:35.4pt'>Media Gateways de 1 a 64 E1s para SIP com R2, ISDN e SS7;<o:p></o:p></pre><pre style='margin-left:35.4pt'>Intercomunicadores para acesso remoto via rede IP. Conheça em <a href="http://www.Khomp.com" target="_blank">www.Khomp.com</a>.<o:p></o:p></pre><pre style='margin-left:35.4pt'>_______________________________________________<o:p></o:p></pre><pre style='margin-left:35.4pt'>ALIGERA &#8211; Fabricante nacional de Gateways SIP-E1 para R2, ISDN e SS7.<o:p></o:p></pre><pre style='margin-left:35.4pt'>Placas de 1E1, 2E1, 4E1 e 8E1 para PCI ou PCI Express.<o:p></o:p></pre><pre style='margin-left:35.4pt'>Channel Bank &#8211; Appliance Asterisk - Acesse <a href="http://www.aligera.com.br" target="_blank">www.aligera.com.br</a>.<o:p></o:p></pre><pre style='margin-left:35.4pt'>_______________________________________________<o:p></o:p></pre><pre style='margin-left:35.4pt'>Para remover seu email desta lista, basta enviar um email em branco para <a href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org" target="_blank">asteriskbrasil-unsubscribe@listas.asteriskbrasil.org</a><o:p></o:p></pre></blockquote><pre style='margin-left:35.4pt'><o:p>&nbsp;</o:p></pre><pre style='margin-left:35.4pt'>_______________________________________________<o:p></o:p></pre><pre style='margin-left:35.4pt'>KHOMP: completa linha de placas externas FXO, FXS, GSM e E1;<o:p></o:p></pre><pre style='margin-left:35.4pt'>Media Gateways de 1 a 64 E1s para SIP com R2, ISDN e SS7;<o:p></o:p></pre><pre style='margin-left:35.4pt'>Intercomunicadores para acesso remoto via rede IP. Conheça em <a href="http://www.Khomp.com" target="_blank">www.Khomp.com</a>.<o:p></o:p></pre><pre style='margin-left:35.4pt'>_______________________________________________<o:p></o:p></pre><pre style='margin-left:35.4pt'>ALIGERA &#8211; Fabricante nacional de Gateways SIP-E1 para R2, ISDN e SS7.<o:p></o:p></pre><pre style='margin-left:35.4pt'>Placas de 1E1, 2E1, 4E1 e 8E1 para PCI ou PCI Express.<o:p></o:p></pre><pre style='margin-left:35.4pt'>Channel Bank &#8211; Appliance Asterisk - Acesse <a href="http://www.aligera.com.br" target="_blank">www.aligera.com.br</a>.<o:p></o:p></pre><pre style='margin-left:35.4pt'>_______________________________________________<o:p></o:p></pre><pre style='margin-left:35.4pt'>Para remover seu email desta lista, basta enviar um email em branco para <a href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org" target="_blank">asteriskbrasil-unsubscribe@listas.asteriskbrasil.org</a><o:p></o:p></pre></blockquote><pre style='margin-left:35.4pt'><o:p>&nbsp;</o:p></pre><p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:35.4pt'><o:p>&nbsp;</o:p></p><pre style='margin-left:35.4pt'>_______________________________________________<o:p></o:p></pre><pre style='margin-left:35.4pt'>KHOMP: completa linha de placas externas FXO, FXS, GSM e E1;<o:p></o:p></pre><pre style='margin-left:35.4pt'>Media Gateways de 1 a 64 E1s para SIP com R2, ISDN e SS7;<o:p></o:p></pre><pre style='margin-left:35.4pt'>Intercomunicadores para acesso remoto via rede IP. Conheça em <a href="http://www.Khomp.com" target="_blank">www.Khomp.com</a>.<o:p></o:p></pre><pre style='margin-left:35.4pt'>_______________________________________________<o:p></o:p></pre><pre style='margin-left:35.4pt'>ALIGERA &#8211; Fabricante nacional de Gateways SIP-E1 para R2, ISDN e SS7.<o:p></o:p></pre><pre style='margin-left:35.4pt'>Placas de 1E1, 2E1, 4E1 e 8E1 para PCI ou PCI Express.<o:p></o:p></pre><pre style='margin-left:35.4pt'>Channel Bank &#8211; Appliance Asterisk - Acesse <a href="http://www.aligera.com.br" target="_blank">www.aligera.com.br</a>.<o:p></o:p></pre><pre style='margin-left:35.4pt'>_______________________________________________<o:p></o:p></pre><pre style='margin-left:35.4pt'>Para remover seu email desta lista, basta enviar um email em branco para <a href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org" target="_blank">asteriskbrasil-unsubscribe@listas.asteriskbrasil.org</a><o:p></o:p></pre></blockquote><p class=MsoNormal style='margin-left:35.4pt'><o:p>&nbsp;</o:p></p></div><p class=MsoNormal style='margin-left:35.4pt'><br>_______________________________________________<br>KHOMP: completa linha de placas externas FXO, FXS, GSM e E1;<br>Media Gateways de 1 a 64 E1s para SIP com R2, ISDN e SS7;<br>Intercomunicadores para acesso remoto via rede IP. Conheça em <a href="http://www.Khomp.com" target="_blank">www.Khomp.com</a>.<br>_______________________________________________<br>ALIGERA &#8211; Fabricante nacional de Gateways SIP-E1 para R2, ISDN e SS7.<br>Placas de 1E1, 2E1, 4E1 e 8E1 para PCI ou PCI Express.<br>Channel Bank &#8211; Appliance Asterisk - Acesse <a href="http://www.aligera.com.br" target="_blank">www.aligera.com.br</a>.<br>_______________________________________________<br>Para remover seu email desta lista, basta enviar um email em branco para <a href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org">asteriskbrasil-unsubscribe@listas.asteriskbrasil.org</a><o:p></o:p></p></blockquote></div></div></body></html>