[asterisk-users] Realtime Extension Lookups

Douglas Garstang dgarstang at oneeighty.com
Thu Aug 17 13:08:17 MST 2006


I'm curious, have always been curious... why does realtime repeat the same query multiple times when lookup up extensions? This is one of the reasons we chose not to use it, but I'm still wondering why it does it?

[14:05][root at labpbx1(pbx1):asterisk]# ngrep -d eth0 port 3306 | grep SELECT
  ]....SELECT * FROM extensions_table WHERE exten = '1000' AND context = 'test1' AND priority = '1'                              
  ]....SELECT * FROM extensions_table WHERE exten = '1000' AND context = 'test1' AND priority = '1'                              
  ]....SELECT * FROM extensions_table WHERE exten = '1000' AND context = 'test1' AND priority = '1'                              
  ]....SELECT * FROM extensions_table WHERE exten = '1000' AND context = 'test1' AND priority = '1'                              
  ]....SELECT * FROM extensions_table WHERE exten = '1000' AND context = 'test1' AND priority = '1'  
(FIVE TIMES???? Why 5 times?)
                            
  ]....SELECT * FROM extensions_table WHERE exten = '1000' AND context = 'test1' AND priority = '2'                              
  ]....SELECT * FROM extensions_table WHERE exten = '1000' AND context = 'test1' AND priority = '2'                              
  ]....SELECT * FROM extensions_table WHERE exten = '1000' AND context = 'test1' AND priority = '2'                              
  ]....SELECT * FROM extensions_table WHERE exten = '1000' AND context = 'test1' AND priority = '3'                              
  ]....SELECT * FROM extensions_table WHERE exten = '1000' AND context = 'test1' AND priority = '3'                              
  ]....SELECT * FROM extensions_table WHERE exten = '1000' AND context = 'test1' AND priority = '3'                              
  ]....SELECT * FROM extensions_table WHERE exten = '1000' AND context = 'test1' AND priority = '4'                              
  n....SELECT * FROM extensions_table WHERE exten LIKE '\_%' AND context = 'test1' AND priority = '4' ORDER BY exten             
  ]....SELECT * FROM extensions_table WHERE exten = '1000' AND context = 'test1' AND priority = '1'                              
  Z....SELECT * FROM extensions_table WHERE exten = 'h' AND context = 'test1' AND priority = '1'                                 
  n....SELECT * FROM extensions_table WHERE exten LIKE '\_%' AND context = 'test1' AND priority = '1' ORDER BY exten  

Doug.           


More information about the asterisk-users mailing list