[sr-dev] [Async] async_sleep does not work insido a while block
Daniel-Constantin Mierla
miconda at gmail.com
Thu Aug 4 13:48:22 CEST 2011
Run it with higher debug level and maybe you get hints about what happens.
Cheers,
Daniel
On 8/4/11 1:21 PM, Iñaki Baz Castillo wrote:
> 2011/8/4 Iñaki Baz Castillo<ibc at aliax.net>:
>> So, can async_sleep() be called within a while() block? IMHO it seems
>> that the internal while counter lives in the initial process handling
>> the request so when the processing is taken by other process (after
>> async_sleep) it knows nothing about the while.
> More issues:
>
> route[ROUTE_TEST]
> {
> if($avp(async_attemps) == $null)
> $avp(async_attemps) = 0;
>
> if($avp(async_attemps)< 3)
> {
> xlog("L_INFO", "------------- attemp $avp(async_attemps)\n");
> $avp(async_attemps) = $avp(async_attemps) + 1;
> async_route("ROUTE_TEST", 3);
> }
>
> xlog("L_INFO", "*********** if was false: attemp $avp(async_attemps)\n");
> }
>
>
> produces:
>
> INFO:<script>: ------------- attemp 0
> INFO:<script>: ------------- attemp 1
>
> That's all.
>
> It seems that calling async_route() in a route called by a previous
> async_route() call breaks thing.
>
>
--
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kat
http://linkedin.com/in/miconda -- http://twitter.com/miconda
More information about the sr-dev
mailing list