<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:14pt"><div dir="ltr">hi All,</div><div dir="ltr">i am going to making web call using mod_curl in freeswitch,</div><div dir="ltr">it is noticable that on my freeswitch for having internet access ,user have to set proxy,</div><div dir="ltr">for example set proxy on the address like this: http_proxy=http://10.10.10.1:2343 <br></div><div dir="ltr">now i want to running web call as the following way,but how can i set proxy on lua?</div><div dir="ltr"><br>web_url = "http://tycho.usno.navy.mil/cgi-bin/timer.pl"<br><br>num_reads = 0<br><br>api = freeswitch.API()<br>session:answer()<br>while(session:ready() == true and num_reads < 10) do<br>freeswitch.consoleLog("INFO","URL: " .. web_url .. "\n")<br>raw_data = api:execute("curl", web_url)<br>freeswitch.consoleLog("INFO","Raw data:\n" .. raw_data .. "\n\n")<br><br>date_time =
string.match(raw_data,"<BR>.-UTC",1)<br>if (date_time == nil) then<br>freeswitch.consoleLog("INFO","UTC date and time not found\n")<br>else<br>freeswitch.consoleLog("INFO","UTC date and time is '" .. date_time .. "'\n")<br><br>time = string.gsub(date_time,".-(%d+:%d+:%d+).+","%1")<br>freeswitch.consoleLog("INFO","Time is '" .. time .. "'\n\n")<br>session:streamFile("phrase:simple_time:" .. time)<br>end<br>num_reads = num_reads + 1<br>session:execute("sleep","1000")<br>end<br>session:hangup()<br></div><div style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;" dir="ltr"><br></div><div style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;" dir="ltr">any help is welcome,</div><div style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: times new
roman,new york,times,serif; background-color: transparent; font-style: normal;" dir="ltr"><br></div><div style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;" dir="ltr"><br></div><div style="color: rgb(0, 0, 0); font-size: 18.6667px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;" dir="ltr"></div></div></body></html>