[asterisk-bugs] [Asterisk 0012416]: gratuitous, incorrect database lookups when loading a realtime SIP peer/user

noreply at bugs.digium.com noreply at bugs.digium.com
Thu Apr 10 18:37:56 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=12416 
====================================================================== 
Reported By:                _brent_
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   12416
Category:                   Resources/res_config_pgsql
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.19 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             04-10-2008 18:32 CDT
Last Modified:              04-10-2008 18:37 CDT
====================================================================== 
Summary:                    gratuitous, incorrect database lookups when loading
a realtime SIP peer/user
Description: 
With debugging turned way up, I noticed a warning in the CLI when placing a
call between two extensions on an instance of Asterisk (my
sippeers/sipusers table is user_agent_client_assignment):

[Apr 10 23:36:00] WARNING[32014] res_config_pgsql.c: Postgresql RealTime:
Could not find any rows in table user_agent_client_assignment.

Examining the PostgreSQL logs and more Asterisk debugging shows that
Asterisk makes one correct, successful query and several badly-formed,
unsuccessful queries.

See the attachments for output from Asterisk and PostgreSQL.


====================================================================== 

---------------------------------------------------------------------- 
 _brent_ - 04-10-08 18:37  
---------------------------------------------------------------------- 
Oh, and the badly-formed queries are using the call ID, rather than the SIP
username as the basis of the search for the SIP user.

On further investigation, it also appears that the correct query I was
seeing was as the UA was authenticating prior to making the call.

Both log files show one complete (although unanswered) call--dial, ring,
hangup. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
04-10-08 18:37  _brent_        Note Added: 0085327                          
======================================================================




More information about the asterisk-bugs mailing list