[asterisk-dev] Realtime behavior questions ...

Mauro Sergio Ferreira Brasil mauro.brasil at tqi.com.br
Mon Aug 17 08:59:42 CDT 2009


Hello there!

In order to create a new realtime driver, I thought it would be 
important to analyse its behavior using an existent driver.
So, I configured an Asterisk instance to get SIP peers/users, voicemail 
boxes and extensions from a mysql database (no "global"/"general" 
configuration of any king by now), and put a monitor to map the queries 
executed on normal operation.

SIP peer/users and voicemail boxes operation was clear as water to me 
(the database queries are quite straighforward), but some queries 
regarding dialplan extensions are getting me lost.

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'

2- After getting the final step to voicemail, some weird extension 
queries are performed like shown below:

SELECT * FROM extensions WHERE exten = 'a' AND context = 'sip' AND 
priority = '1'
SELECT * FROM extensions WHERE exten LIKE '\\_%' AND context = 'sip' AND 
priority = '1' ORDER BY exten
SELECT * FROM extensions WHERE exten = 'h' AND context = 'sip' AND 
priority = '1'
SELECT * FROM extensions WHERE exten LIKE '\\_%' AND context = 'sip' AND 
priority = '1' ORDER BY exten

Right after these 4 unexpected queries (at least, unexpected for me 
:-)), the final steps of storing the CDR (on mysql too) and update of 
SIP peer/user are performed normally.

I have another situation here where the query for priority "1", 
extension "102" and context "sip" was performed 4 times. Right after a 
new query on which the priority was "-1" was perfomed and this priority 
was used on second query of (4 strange queries above), followed by the 
final 2 strange queries above (the query with "exten = 'a'" was not 
performed on this case.

I have the same configuration present below to all five extensions (101, 
102, 103, 104 and 105) on this "sip" context stored on mysql database:

7,"sip","102",1,"Dial","SIP/${EXTEN}|20|RtT"
8,"sip","102",2,"GotoIf","$[${DIALSTATUS} = BUSY]?5"
9,"sip","102",3,"VoiceMail","${EXTEN}@${VOICEMAILSRV}|u"
10,"sip","102",4,"Hangup",""
11,"sip","102",5,"VoiceMail","${EXTEN}@${VOICEMAILSRV}|b"
12,"sip","102",6,"Hangup",""


Am I missing something here?

Thanks and best regards,

-- 
__At.,                                                                                                                             
   _
 
*Technology and Quality on Information*
Mauro Sérgio Ferreira Brasil
Coordenador de Projetos e Analista de Sistemas
+ mauro.brasil at tqi.com.br <mailto:@tqi.com.br>
: www.tqi.com.br <http://www.tqi.com.br>
( + 55 (34)3291-1700
( + 55 (34)9971-2572

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090817/3ef2db54/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CMMI_2.jpg
Type: image/jpeg
Size: 1705 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20090817/3ef2db54/attachment.jpg 


More information about the asterisk-dev mailing list