<div>Hi Kaloyan,</div>
<div> </div>
<div>I tried to change the LIMIT_RECHECK_APP and I could find Notice: Ext. 293:3 @ default: 120000 at console. In another word, it can visit the URL and get "120000" (120 sec). But the TimeLimit seems always 30 sec. It should be 30 + 120 seconds, isn't it?</div>
<div> </div>
<div>How can I pass the result of URL to TimeLimit?</div>
<div> </div>
<div>I tried serveral methods such as :</div>
<div>exten => 293,1,Set(TimeLimit=Exec(${LIMIT_RECHECK_APP}))</div>
<div>But got message:</div>
<div>Dial does not accept L(Exec(Log(NOTICE|${CURL(http), hanging up.</div>
<div> </div>
<div>And try,</div>
<div>LIMIT_RECHECK_APP=Set(TimeLimit=$<br>LIMIT_RECHECK_APP=${LIMIT_RECHECK_APP}{CURL(<a href="http://127.0.0.1/test.php">http://127.0.0.1/test.php</a>)})</div>
<div>But not any effort to reset the TimeLimit. It is still hungup.</div>
<div> </div>
<div>Can you please give me a sample how to change the TimeLimit via URL?</div>
<div> </div>
<div>My extensions.conf:</div>
<div>================================================================<br>LIMIT_RECHECK_INTERVAL=5000</div>
<div> </div>
<div>LIMIT_RECHECK_APP=Log(NOTICE|$<br>LIMIT_RECHECK_APP=${LIMIT_RECHECK_APP}{CURL(<a href="http://127.0.0.1/test.php">http://127.0.0.1/test.php</a>)})<br> </div>
<div>[default]<br>exten => 293,1,Set(TimeLimit=30000)<br>exten => 293,n,Set(RTCC_INTERVAL=10000)<br>exten => 293,n,Dial(<a href="mailto:Local/AnswerAndWait@default,,L(${TimeLimit}:${RTCC_INTERVAL">Local/AnswerAndWait@default,,L(${TimeLimit}:${RTCC_INTERVAL</a>}))<br>
exten => 293,n,Hangup</div>
<div> </div>
<div> </div>
<div>I also try to use Exec to set the TimeLimit as your tips.</div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div><span class="gmail_quote">2008/3/31, Kaloyan Kovachev <<a href="mailto:kkovachev@varna.net">kkovachev@varna.net</a>>:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">On Mon, 31 Mar 2008 16:20:10 +0800, Charles Wang wrote<br>> Hi, Kaloyan.<br>><br>> I tried to use non-curl version and test it as your tips and the<br>
How2Test.1.5-56340.doc.<br>> But I got error messages on console, it seems never check the URL<br>periodically(I can only find one). In fact, it didn't check the URL during my<br>test. What's wrong in my configuration file?<br>
> I can make sure the URL is correct ( I test it using IE (InterNet Explorer)).<br>><br>> Can you please give me more tips?<br>><br>> Thank you.<br>><br>> Error Messages:<br>> -- Limit Data for this call:<br>
> > timelimit = 30000<br>> > recheck each = 5000<br>> > recheck app =<br>{CURL(<a href="http://127.0.0.1/test.php?app=rtcc&accountcode=&dst=&channelid=&seqnum=1)">http://127.0.0.1/test.php?app=rtcc&accountcode=&dst=&channelid=&seqnum=1)</a>}<br>
> > recheck delay = 0<br>> > play_warning = 10000<br>> > play_to_caller = yes<br>> > play_to_callee = no<br>> > warning_freq = 0<br>> > start_sound = (null)<br>
> > warning_sound = timeleft<br>> > end_sound = (null)<br>> -- Called AnswerAndWait@default<br>> -- Executing [AnswerAndWait@default:1]<br>Wait("Local/AnswerAndWait@default-70ef,2", "10") in new stack<br>
> -- Executing [AnswerAndWait@ppcall-intercom:2]<br>Answer("Local/AnswerAndWait@default-70ef,2", "") in new stack<br>> -- Executing [AnswerAndWait@ppcall-intercom:3]<br>Wait("Local/AnswerAndWait@default-70ef,2", "10") in new stack<br>
> -- Local/AnswerAndWait@default-70ef,1 answered SIP/2922-1<br>> [Mar 31 15:55:43] WARNING[6269]: app_dial.c:864 ast_call_governor: Could not<br>find application<br>({CURL(<a href="http://127.0.0.1/test.php?app=rtcc&accountcode=&dst=&channelid=&seqnum=1)}">http://127.0.0.1/test.php?app=rtcc&accountcode=&dst=&channelid=&seqnum=1)}</a>).<br>
Timelimit not checked for call (1206950127.3)<br>> [Mar 31 15:55:48] WARNING[6269]: app_dial.c:864 ast_call_governor: Could not<br>find application<br>({CURL(<a href="http://127.0.0.1/test.php?app=rtcc&accountcode=&dst=&channelid=&seqnum=1)}">http://127.0.0.1/test.php?app=rtcc&accountcode=&dst=&channelid=&seqnum=1)}</a>).<br>
Timelimit not checked for call (1206950127.3)<br>><br>><br>> My extensions.conf :<br>><br>> [globals]<br>> LIMIT_RECHECK_INTERVAL=5000<br>><br>> LIMIT_RECHECK_APP=$<br>> LIMIT_RECHECK_APP=${LIMIT_RECHECK_APP}{CURL(<a href="http://127.0.0.1/test.php">http://127.0.0.1/test.php</a>?<br>
> LIMIT_RECHECK_APP=${LIMIT_RECHECK_APP}app=rtcc&accountcode=$<br>> LIMIT_RECHECK_APP=${LIMIT_RECHECK_APP}{ACCOUNTCODE}&dst=$<br>> LIMIT_RECHECK_APP=${LIMIT_RECHECK_APP}{EXTEN}&channelid=$<br>> LIMIT_RECHECK_APP=${LIMIT_RECHECK_APP}{UNIQUEID}&seqnum=1)}<br>
> [default]<br>> exten => AnswerAndWait,1,Wait(10)<br>> exten => AnswerAndWait,2,Answer()<br>> exten => AnswerAndWait,3,Wait(10)<br>> exten => AnswerAndWait,4,Goto(3)<br>> exten => _X.,1,Set(TimeLimit=30000) ;; 30 sec<br>
> exten => _X.,n,Set(RTCC_INTERVAL=10000) ;; 10 sec<br>> exten =><br>_X.,n,Dial(Local/AnswerAndWait@default,,L(${TimeLimit}:${RTCC_INTERVAL}))<br>> exten => _X.,n,Hangup<br>><br>><br>><br>> [Mar 31 15:43:57] WARNING[6125]: app_dial.c:864 ast_call_governor: Could not<br>
find application<br>(${CURL(<a href="http://127.0.0.1/test.php?app=rtcc&accountcode=${ACCOUNTCODE}&dst=${EXTEN}&channelid=${UNIQUEID}&seqnum=1)}{CURL(http://127.0.0.1/test.php?app=rtcc&accountcode=&dst=&channelid=&seqnum=1)}">http://127.0.0.1/test.php?app=rtcc&accountcode=${ACCOUNTCODE}&dst=${EXTEN}&channelid=${UNIQUEID}&seqnum=1)}{CURL(http://127.0.0.1/test.php?app=rtcc&accountcode=&dst=&channelid=&seqnum=1)}</a>).<br>
Timelimit not checked for call (1206949422.10)<br>> [Mar 31 15:44:02] WARNING[6125]: app_dial.c:864 ast_call_governor: Could not<br>find application<br>(${CURL(<a href="http://127.0.0.1/test.php?app=rtcc&accountcode=${ACCOUNTCODE}&dst=${EXTEN}&channelid=${UNIQUEID}&seqnum=1)}{CURL(http://127.0.0.1/test.php?app=rtcc&accountcode=&dst=&channelid=&seqnum=1)}">http://127.0.0.1/test.php?app=rtcc&accountcode=${ACCOUNTCODE}&dst=${EXTEN}&channelid=${UNIQUEID}&seqnum=1)}{CURL(http://127.0.0.1/test.php?app=rtcc&accountcode=&dst=&channelid=&seqnum=1)}</a>).<br>
Timelimit not checked for call (1206949422.10)<br>><br><br>sory CURL is a function not application, so you will need to change the<br>LIMIT_RECHECK_APP variable to NoOp() that function:<br><br>[globals]<br>LIMIT_RECHECK_INTERVAL=5000<br>
<br>LIMIT_RECHECK_APP=NoOp($<br>LIMIT_RECHECK_APP=${LIMIT_RECHECK_APP}{CURL(<a href="http://127.0.0.1/test.php">http://127.0.0.1/test.php</a>?<br>LIMIT_RECHECK_APP=${LIMIT_RECHECK_APP}app=rtcc&accountcode=$<br>LIMIT_RECHECK_APP=${LIMIT_RECHECK_APP}{ACCOUNTCODE}&dst=$<br>
LIMIT_RECHECK_APP=${LIMIT_RECHECK_APP}{EXTEN}&channelid=$<br>LIMIT_RECHECK_APP=${LIMIT_RECHECK_APP}{UNIQUEID}&seqnum=1)})<br><br>[default]<br><br>exten => AnswerAndWait,1,Wait(10)<br>exten => AnswerAndWait,2,Answer()<br>
exten => AnswerAndWait,3,Wait(10)<br>exten => AnswerAndWait,4,Goto(3)<br><br>exten => _X.,1,Set(TimeLimit=30000) ;; 30 sec<br>exten => _X.,n,Set(RTCC_INTERVAL=10000) ;; 10 sec<br>exten => _X.,n,Dial(Local/AnswerAndWait@default,,L(${TimeLimit}:${RTCC_INTERVAL}))<br>
exten => _X.,n,Hangup<br><br>I would suggest you to start with the Log(NOTICE) example (from How2Test) and<br>after you see the NOTICE on console (at regular intervals) to adjust the<br>LIMIT_RECHECK_APP variable according to your needs. You may check if it<br>
properly set by running Exec(${LIMIT_RECHECK_APP}) or by setting the initial<br>limit from it and it should use the value from your php script:<br><br>exten => _X.,1,Set(TimeLimit=Exec(${LIMIT_RECHECK_APP}))<br><br>><br>
> 2008/3/28, Grey Man <<a href="mailto:greymanvoip@gmail.com">greymanvoip@gmail.com</a>>: On Thu, Mar 27, 2008 at 10:10<br>AM, Charles Wang <<a href="mailto:lazy.charles@gmail.com">lazy.charles@gmail.com</a>> wrote:<br>
> > Hi all,<br>> ><br>> > I tried to using rtcc-curl-1.4.13.patch in bug id 6335<br>> > <a href="http://bugs.digium.com/view.php?id=6335">http://bugs.digium.com/view.php?id=6335</a> reported by KNK. I patch it to<br>
> > asterisk <a href="http://1.4.18.1">1.4.18.1</a> and it seems work.<br>> ><br>> > My extensions.conf lists below:<br>> ><br>> > exten =><br>> ><br>_X.,1,Set(TimeLimit=${CURL(<a href="http://127.0.0.1/test.php?app=rtcc&accountcode=${ACCOUNTCODE}&dst=${EXTEN}&channelid=${UNIQUEID}&seqnum=1)}">http://127.0.0.1/test.php?app=rtcc&accountcode=${ACCOUNTCODE}&dst=${EXTEN}&channelid=${UNIQUEID}&seqnum=1)}</a>)<br>
<br>> > exten => _X.,n,Set(TimeLimit=${MATH(${TimeLimit}+5,int)})<br>> > exten => _X.,n,Set(TimeLimit=${MATH(${TimeLimit}*1000,int)})<br>> > exten => _X.,n,Set(dst=${EXTEN})<br>> > exten => _X.,n,NoOp(Initial time limit for ${ACCOUNTCODE} and ${EXTEN} set<br>
> > at ${TimeLimit})<br>> > exten => _X.,n,Set(RTCC_START_SEQNUM=2)<br>> > exten => _X.,n,Set(RTCC_INTERVAL=60000)<br>> > exten => _X.,n,Dial(SIP/1025,,L(${TimeLimit}:::<a href="http://127.0.0.1/test.php)">http://127.0.0.1/test.php)</a>)<br>
> > exten => _X.,n,Hangup<br>> ><br>> > My URL test.php always reponses interger 120. It is pure text format without<br>> > any symbol before/after it.<br>> ><br>> > My test.php: ( one row only )<br>
> > 120<br>> ><br>> > -- Accepting AUTHENTICATED call from XXX.XXX.XXX.XXX:<br>> > > requested format = ilbc,<br>> > > requested prefs = (),<br>> > > actual format = ilbc,<br>
> > > host prefs = (ilbc),<br>> > > priority = mine<br>> > -- Executing [_X.@default:1] Set("SIP/2922-10", "TimeLimit=120") in new<br>> > stack<br>> > -- Executing [_X.@default:2] Set("SIP/2922-10", "TimeLimit=125") in new<br>
> > stack<br>> > -- Executing [_X.@default:3] Set("SIP/2922-10", "TimeLimit=125000") in<br>> > new stack<br>> > -- Executing [_X.@default:4] Set("SIP/2922-10", "dst=295") in new stack<br>
> > -- Executing [_X.@default:5] NoOp("SIP/2922-10", "Initial time limit for<br>> > and 295 set at 45000") in new stack<br>> > -- Executing [_X.@default:6] Set("SIP/2922-10", "RTCC_START_SEQNUM=2")<br>
> > in new stack<br>> > -- Executing [_X.@default:7] Set("SIP/2922-10", "RTCC_INTERVAL=60000")<br>> > in new stack<br>> > -- Executing [_X.@default:8] Dial("SIP/2922-10",<br>
> > "SIP/1025||L(125000::<a href="http://127.0.0.1/test.php)">http://127.0.0.1/test.php)</a>") in new stack<br>> > -- Limit Data for this call:<br>> > > timelimit = 125000<br>
> > > play_warning = 0<br>> > > play_to_caller = yes<br>> > > play_to_callee = no<br>> > > warning_freq = 0<br>> > > rtcc url = //127.0.0.1/test.php<br>
> > > rtcc interval = 60000<br>> > > rtcc exp intvl = 0<br>> > > rtcc seqnum = 2<br>> > > start_sound = (null)<br>> > > warning_sound = timeleft<br>
> > > end_sound = (null)<br>> ><br>> > During the period, I trace the /var/log/httpd/access_log. I can't find any<br>> > request to test.php. Should it be visited each 6 sec ?<br>
><br>> You've got the interval set at 60s. If you want the rtcc call to be<br>> made every 6s change to:<br>><br>> exten => _X.,n,Set(RTCC_INTERVAL=6000)<br>><br>> > (Only this line)<br>> > <a href="http://127.0.0.1">127.0.0.1</a> - - [27/Mar/2008:17:51:54 +0800] "GET<br>
> > /test.php?app=rtcc&accountcode=&dst=295&channelid=1206611514.2&seqnum=1<br>> > HTTP/1.1" 200 3 "-" "asterisk-libcurl-agent/1.0"<br>> ><br>> > Then, I tried to reduce the integer number 120 to 80. I wish it can be hunup<br>
> > when 80 seconds reached. But the answer was NO. It made my asterisk crashed.<br>> > I got this message in debug mode.<br>> ><br>> > [Mar 27 17:52:58] DEBUG[32053]: app_dial.c:877 rtcccallback: call control<br>
> > accountcode=2922, dst=295.<br>> > asterisk: symbol lookup error: /usr/lib/asterisk/modules/app_dial.so:<br>> > undefined symbol: curl_easy_init<br>> ><br>> > Can anyone kindly give me any idea?<br>
><br>> It's bad if the patch crashed Asterisk. The latest patch I did was for<br>> 1.14.17 and it should have a better chance of working properly. I've<br>> attached the 1.4.17 patch since I can't upload files to the bug<br>
> tracker anymore since it was decided by someone somewhere that rtcc is<br>> of no interest to Asterisk users even though it's regularly requested<br>> and there are two patch options available.<br>><br>> Regards,<br>
><br>> Greyman.<br>><br>> _______________________________________________<br>> --Bandwidth and Colocation Provided by <a href="http://www.api-digital.com--">http://www.api-digital.com--</a><br>><br>> asterisk-dev mailing list<br>
> To UNSUBSCRIBE or update options visit:<br>> <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br>><br>><br>><br>> --<br>><br>
> Best Regards<br>> Charles<br><br><br>_______________________________________________<br>--Bandwidth and Colocation Provided by <a href="http://www.api-digital.com--">http://www.api-digital.com--</a><br><br>asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br></blockquote></div><br><br clear="all"><br>-- <br><br>
Best Regards<br>Charles