Logre ejecutar el php desde el asterisk al equipo remoto
en el dialplan deje asi :
exten => 124,1,Answer()
exten => 124,2,AGI(agi://192.168.0.201:4573/test.php)
y en el archivo del servidor remoto esto nano /etc/xinetd.d/fastagi :
default: off
description: fastagi is a remote AGI interface
service fastagi
{
socket_type = stream
user = root
group = nobody
server = /var/lib/asterisk/agi-bin/phpagi/jp.php
wait = no
protocol = tcp
bind = 192.168.0.201
port = 4573
disable = no
}
y al ejecutar la llamada me muestra ahora asi en el CLI:
-- Executing [124@default:1] Answer("SIP/2000-00000090", "") in new stack
-- Executing [124@default:2] AGI("SIP/2000-00000090", "agi://192.168.0.201:4573/test.php") in new stack
AGI Tx >> agi_network: yes
AGI Tx >> agi_network_script: test.php
AGI Tx >> agi_request: agi://192.168.0.201:4573/test.php
AGI Tx >> agi_channel: SIP/2000-00000090
AGI Tx >> agi_language: es
AGI Tx >> agi_type: SIP
AGI Tx >> agi_uniqueid: 1357596721.144
AGI Tx >> agi_callerid: 2000
AGI Tx >> agi_calleridname: demo jp
AGI Tx >> agi_callingpres: 0
AGI Tx >> agi_callingani2: 0
AGI Tx >> agi_callington: 0
AGI Tx >> agi_callingtns: 0
AGI Tx >> agi_dnid: 124
AGI Tx >> agi_rdnis: unknown
AGI Tx >> agi_context: default
AGI Tx >> agi_extension: 124
AGI Tx >> agi_priority: 2
AGI Tx >> agi_enhanced: 0.0
AGI Tx >> agi_accountcode:
AGI Tx >>
AGI Rx << ANSWER
AGI Tx >> 200 result=0
AGI Rx << VERBOSE "PRUEBA JPPPPPPPPPPPPPPPPPPPPPPPPPPPPP" 1
agi://192.168.0.201:4573/test.php: PRUEBA JPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
AGI Tx >> 200 result=1
-- AGI Script agi://192.168.0.201:4573/test.php completed, returning 0
== Auto fallthrough, channel 'SIP/2000-00000090' status is 'UNKNOWN'
En lo unico que estoy topando ahora es que si o si tengo que colocar el nombre del archivo php en la ruta server = /var/lib/asterisk/agi-bin/phpagi/jp.php
y deberia quedar algo asi para que lea cualquier archivo php : server = /var/lib/asterisk/agi-bin/phpagi/*.php
atento a sus comentarios.