Mamadou NGOM
2016-May-04 12:49 UTC
[asterisk-users] Compatibilty between agi for asterisk 13.8.0 and php5.6
<!DOCTYPE html> <html><head> <meta charset="UTF-8"> </head><body><p>Hello everybody, </p><p>When I call my extension the agi script don't work well. when I look at the cli, that is what I have:</p><p><SIP/myprovider-00000007>AGI Tx >> agi_request: ******.php<br><SIP/myprovider-00000007>AGI Tx >> agi_channel: SIP/myprovider-00000007<br><SIP/myprovider-00000007>AGI Tx >> agi_language: fr<br><SIP/myprovider-00000007>AGI Tx >> agi_type: SIP<br><SIP/myprovider-00000007>AGI Tx >> agi_uniqueid: ***************<br><SIP/myprovider-00000007>AGI Tx >> agi_version: 13.8.0<br><SIP/myprovider-00000007>AGI Tx >> agi_callerid:*********<br><SIP/myprovider-00000007>AGI Tx >> agi_calleridname: unknown<br><SIP/myprovider-00000007>AGI Tx >> agi_callingpres: 0<br><SIP/myprovider-00000007>AGI Tx >> agi_callingani2: 0<br><SIP/myprovider-00000007>AGI Tx >> agi_callington: 0<br><SIP/myprovider-00000007>AGI Tx >> agi_callingtns: 0<br><SIP/myprovider-00000007>AGI Tx >> agi_dnid: ********<br><SIP/myprovider-00000007>AGI Tx >> agi_rdnis: unknown<br><SIP/myprovider-00000007>AGI Tx >> agi_context: default<br><SIP/myprovider-00000007>AGI Tx >> agi_extension: ********<br><SIP/myprovider-00000007>AGI Tx >> agi_priority: 13<br><SIP/myprovider-00000007>AGI Tx >> agi_enhanced: 0.0<br><SIP/myprovider-00000007>AGI Tx >> agi_accountcode:<br><SIP/myprovider-00000007>AGI Tx >> agi_threadid: *********************<br><SIP/myprovider-00000007>AGI Tx >> agi_arg_1: 56<br><SIP/myprovider-00000007>AGI Tx >><br><SIP/myprovider-00000007>AGI Rx << SET VARIABLE ****** 2<br><SIP/myprovider-00000007>AGI Tx >> <span style="color: rgb(255, 0, 0); background-color: rgb(255, 255, 0);">510 Invalid or unknown command</span><br> -- <SIP/myprovider-00000007>AGI Script *******.php completed, returning 0</p><p>I looked on the Internet but I saw a clear answer</p><p>it is sure that it is for the compatibility between php5.6 and agi. if somebody can help me.</p><p><br></p><p>Thank you !!!</p><p><br></p><div class="io-ox-signature"><p>Mamadou NGOM</p><p>Ingénieur Télécommunications & Réseaux</p><p>Mobile: 06 72 45 23 03</p><p>Skype: Mamadou Numericap</p><p>NumeriCap – SAS au capital de 30.000,00€ - RCS de Toulon N° 530188432 – TVA FR 485301188432 – APE6110Z - ARCEP N°13/0015. <br>siège social : « le Galaxie C » 526 avenue Maréchal de Lattre de Tassigny 83000 Toulon. <a href="mailto:mail%3Afinance@numericap.com">mail: finance@numericap.com</a><br>Centre d’exploitation : « Résidence les Coquières » 11 avenue Joseph Fallen - 13400 Aubagne – Tel :<a>04.42.73.88.52</a> <br></p></div></body></html>
A J Stiles
2016-May-04 13:13 UTC
[asterisk-users] Compatibilty between agi for asterisk 13.8.0 and php5.6
On Wednesday 04 May 2016, Mamadou NGOM wrote:> Hello everybody, > When I call my extension the agi script don't work well. when I look at > the cli, that is what I have: > [stuff deleted] > <SIP/myprovider-00000007>AGI Tx >> agi_arg_1: 56 > <SIP/myprovider-00000007>AGI Tx >> > <SIP/myprovider-00000007>AGI Rx << SET VARIABLE ****** 2 > <SIP/myprovider-00000007>AGI Tx >> 510 Invalid or unknown command > -- <SIP/myprovider-00000007>AGI Script *******.php completed, returning 0 > I looked on the Internet but I saw a clear answer > it is sure that it is for the compatibility between php5.6 and agi. if > somebody can help me.It looks as though something might be going wrong in the AGI script itself. Did you use a "proper" AGI library, or a quick-and-dirty homebrew solution? (There is little virtue in walking all the way to the tool shed to fetch a chisel, if you know the screwdriver you already have in your drawer can be used for the job. On the other hand, breaking your screwdriver by inappropriately using it as a chisel does not look too good either. Knowing the difference is one of the qualities of a great programmer.) SET VARIABLE is a legitimate enough command, but ****** probably is not a valid variable name. Maybe there was a forbidden character in there before you redacted it? I would try to isolate the problem, by writing an AGI script that *just* sets a variable to some fixed value and exits; and having a corresponding extension that *just* calls the AGI script, displays the variable's value in the CLI with a NoOp() statement and then hangs up. When you know you can do that, and successfully read back the value from within your dialplan, *then* you can make it decide what value to put in that variable. -- AJS Note: Originating address only accepts e-mail from list! If replying off- list, change address to asterisk1list at earthshod dot co dot uk .
Michael L. Young
2016-May-04 13:20 UTC
[asterisk-users] Compatibilty between agi for asterisk 13.8.0 and php5.6
----- On May 4, 2016, at 8:49 AM, Mamadou NGOM ngom at numericap.com wrote:> Hello everybody,> When I call my extension the agi script don't work well. when I look at the cli, > that is what I have:> <SIP/myprovider-00000007>AGI Tx >> agi_request: ******.php > <SIP/myprovider-00000007>AGI Tx >> agi_channel: SIP/myprovider-00000007 > <SIP/myprovider-00000007>AGI Tx >> agi_language: fr > <SIP/myprovider-00000007>AGI Tx >> agi_type: SIP > <SIP/myprovider-00000007>AGI Tx >> agi_uniqueid: *************** > <SIP/myprovider-00000007>AGI Tx >> agi_version: 13.8.0 > <SIP/myprovider-00000007>AGI Tx >> agi_callerid:********* > <SIP/myprovider-00000007>AGI Tx >> agi_calleridname: unknown > <SIP/myprovider-00000007>AGI Tx >> agi_callingpres: 0 > <SIP/myprovider-00000007>AGI Tx >> agi_callingani2: 0 > <SIP/myprovider-00000007>AGI Tx >> agi_callington: 0 > <SIP/myprovider-00000007>AGI Tx >> agi_callingtns: 0 > <SIP/myprovider-00000007>AGI Tx >> agi_dnid: ******** > <SIP/myprovider-00000007>AGI Tx >> agi_rdnis: unknown > <SIP/myprovider-00000007>AGI Tx >> agi_context: default > <SIP/myprovider-00000007>AGI Tx >> agi_extension: ******** > <SIP/myprovider-00000007>AGI Tx >> agi_priority: 13 > <SIP/myprovider-00000007>AGI Tx >> agi_enhanced: 0.0 > <SIP/myprovider-00000007>AGI Tx >> agi_accountcode: > <SIP/myprovider-00000007>AGI Tx >> agi_threadid: ********************* > <SIP/myprovider-00000007>AGI Tx >> agi_arg_1: 56 > <SIP/myprovider-00000007>AGI Tx >> > <SIP/myprovider-00000007>AGI Rx << SET VARIABLE ****** 2 > <SIP/myprovider-00000007>AGI Tx >> 510 Invalid or unknown command > -- <SIP/myprovider-00000007>AGI Script *******.php completed, returning 0> I looked on the Internet but I saw a clear answer> it is sure that it is for the compatibility between php5.6 and agi. if somebody > can help me.Make sure there are no windows or dos line endings in that php script. Try running it through dos2unix and see if that solves your issue. Regards, Michael (elguero)