[asterisk-dev] Realtime behavior questions ...

Kai Hoerner kai at ciphron.de
Tue Aug 18 07:53:02 CDT 2009


Tilghman Lesher schrieb:
>> 1- Same query is performed more than once:
>>
>> For example: the query below regarding the priority "3" from extension
>> "102" of context "sip" gets performed 3 times... and the same happens
>> with prior steps(priorities).
>>
>> SELECT * FROM extensions WHERE exten = '102' AND context = 'sip' AND
>> priority = '3'
> Yes, that's correct.  It's not optimal, but due to the dialplan architecture,
> it's somewhat unavoidable.  A possible optimization would be to cache the
> results of queries for some short period of time.
I still can't grasp why a query like this must be performed three (or 
more) times.
It will always return the same set of results, if the row was not 
changed in the meanwhile.

Executing this query more than once for a single lookup is pointless and 
clearly a waste of resources.

The "a" extension could be looked up at the point when a caller actually 
pressed '*', there's no need to look it up if the caller does not press '*'.
This behaviour can only be altered in app_voicemail and not in 
res_mysql, i think.


Best Regards,

Kai Hoerner


-- 
CIPHRON GmbH

Tel.: (05 11) 51 51 33 - 0      Fax:          (05 11) 51 51 33 - 29
Web: http://www.ciphron.de/     Support:      (05 11) 51 51 33 - 11

Ust.Id.: DE263362886            Geschäftsführer:  Sebastian Horzela
                                Amtsgericht Hannover, HRB 203590
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090818/14950f40/attachment-0001.htm 


More information about the asterisk-dev mailing list