[mailto:[email protected]] On Behalf Of Ron
actually the ${OUTBOUND} is generated by the php... but based on what
will be received on ${ARG1}. unfortunately i am not getting the value
from the argument. not sure why. thanks again.
On Fri, 25 Feb 2011, Danny Nicholas wrote:
This probably seems too elementary, but a "standard practice" I use with
my PERL AGI scripts is to run each of them from bash before I put them
into the dialplan so I have an idea how they will react.
In your particular case, you should be able to do this from bash:
$ php getchannel.php 100 (change 100 to what you are sending in the
dialplan)
The program should print back out
"Set OUTBOUND=xxxx"
Until you get this output, you are wasting everyone's time.
A 'better' way to 'desk check' an AGI would be to feed it a somewhat
static AGI environment using a script like:
agi-environment.sh
==================
# output a fake AGI environment
echo "agi_accountcode: "
echo "agi_callerid: 1234567890"
echo "agi_calleridname: example"
echo "agi_callingani2: 0"
echo "agi_callingpres: 0"
echo "agi_callingtns: 0"
echo "agi_callington: 0"
echo "agi_channel: SIP/example"
echo "agi_context: example"
echo "agi_dnid: *"
echo "agi_enhanced: 0.0"
echo "agi_extension: *"
echo "agi_language: en"
echo "agi_priority: 1"
echo "agi_rdnis: unknown"
echo "agi_request: example"
echo "agi_type: SIP"
echo "agi_uniqueid: 1234567890.12"
echo ""
# respond to requests
echo "200 result=0"
echo "200 result=0"
echo "200 result=0"
echo "200 result=0"
# (end of agi-environment.sh)
And then:
./agi-environment.sh | /var/lib/asterisk/agi-bin/getchannel.php 100
--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards [email protected] Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users