AGI - version 14.2.1

I upgraded asterisk to version 14.2.1 sometimes an error occurs while running AGI.

You are going to need to provide much more detail, such as the error that occurs and what the AGI is doing.

JColp good morning, follows details:

== Using SIP RTP CoS mark 5
– Executing [1111@entrada-pabx:1] NoOp(“SIP/1821044000-0000009d”, “origem 18981279285”) in new stack
– Executing [1111@entrada-pabx:2] AGI(“SIP/1821044000-0000009d”, “,18981279285”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/
<SIP/1821044000-0000009d>AGI Tx >> agi_request:
<SIP/1821044000-0000009d>AGI Tx >> agi_channel: SIP/1821044000-0000009d
<SIP/1821044000-0000009d>AGI Tx >> agi_language: en
<SIP/1821044000-0000009d>AGI Tx >> agi_type: SIP
<SIP/1821044000-0000009d>AGI Tx >> agi_uniqueid: 1482833947.176
<SIP/1821044000-0000009d>AGI Tx >> agi_version: 14.2.1
<SIP/1821044000-0000009d>AGI Tx >> agi_callerid: 18981279285
<SIP/1821044000-0000009d>AGI Tx >> agi_calleridname: asreceived
<SIP/1821044000-0000009d>AGI Tx >> agi_callingpres: 0
<SIP/1821044000-0000009d>AGI Tx >> agi_callingani2: 0
<SIP/1821044000-0000009d>AGI Tx >> agi_callington: 0
<SIP/1821044000-0000009d>AGI Tx >> agi_callingtns: 0
<SIP/1821044000-0000009d>AGI Tx >> agi_dnid: 1111
<SIP/1821044000-0000009d>AGI Tx >> agi_rdnis: 4192
<SIP/1821044000-0000009d>AGI Tx >> agi_context: entrada-pabx
<SIP/1821044000-0000009d>AGI Tx >> agi_extension: 1111
<SIP/1821044000-0000009d>AGI Tx >> agi_priority: 2
<SIP/1821044000-0000009d>AGI Tx >> agi_enhanced: 0.0
<SIP/1821044000-0000009d>AGI Tx >> agi_accountcode:
<SIP/1821044000-0000009d>AGI Tx >> agi_threadid: 139958997088000
<SIP/1821044000-0000009d>AGI Tx >> agi_arg_1: 18981279285
<SIP/1821044000-0000009d>AGI Tx >>
– <SIP/1821044000-0000009d>AGI Script completed, returning 4

exten => _1111,1,NoOp(origem ${CALLERID(num)})
same => n,AGI(,${CALLERID(num)})
same => n,NoOp(numero: ${numero})
same => n,GotoIf($[${ISNULL(${numero})}=1]?fim)
same => n,Macro(gravacallback,${CALLERID(num)})
same => n(fim),Hangup
#import module required.
import sys
import urllib2
conexao = urllib2.urlopen(“http://srvtel2/telefone/consultanumero.php?acao=consultacallback&numero=”+sys.argv[1])
numero = str(
sys.stdout.write("SET VARIABLE numero "+numero)

On the second attempt the AGI performs normally. The problem is intermittent.

jcolp, the details they send are being satisfying?

jcolp good morning, any news?

It does not appear as though your AGI script is properly implementing the AGI specification. It should be reading in the data provided to it from Asterisk, without doing so I’m not sure how things would behave. I’d suggest using a library which implements the AGI specification. You can find a list on the wik[1].


I returned to version 13.9.0-rc2 and it is normal.
Thank you.