On Thu, Sep 21, 2006 at 12:03:06PM -0600, Colin Anderson wrote:
> You need to use AGI to do this. 

Why not use the application or function Curl?

> You would put a shell script yourscript.agi
> in /var/lib/asterisk/agi-bin
>  
> If you want an HTTP response dumped into your dialplan as a variable, you
> would use wget:
>  
> myagi.agi:
>  
> #!/bin/bash
> TMPFILE=/tmp/$$.$RANDOM

instead of that:

set -e
TMPFILE=`mktemp`

> wget -q -t3 --output-document=$TMPFILE http://mysite.com/myhtml.html
> MYVAR=$(cat $TMPFILE)
> echo "SET VARIABLE MYASTERISKVAR \"$MYVAR\""
> rm $TMPFILE

-- 
Tzafrir Cohen         sip:[EMAIL PROTECTED]
icq#16849755          iax:[EMAIL PROTECTED]
+972-50-7952406          jabber:[EMAIL PROTECTED]
[EMAIL PROTECTED]     http://www.xorcom.com
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to