[asterisk-users] Difference in information realtime database table and Asterisk sip show peers

Jonas Kellens jonas.kellens at telenet.be
Tue Apr 20 10:27:11 CDT 2021


Hello


can anyone explain to me why (and HOW) there is a difference in data 
between the Asterisk console "sip show peers" and the realtime MySQL 
configuration ?


Using : asterisk-certified-13.21-cert6


Asterisk console data :

/usr/sbin/asterisk -rx 'sip show peers' | grep 660091086
660091086/660091086       11.22.33.44 D  Yes        Yes            
55018    OK (31 ms)                                   Cached RT


/usr/sbin/asterisk -rx 'sip show peer 660091086'

   * Name       : 660091086
   Description  :
   Realtime peer: Yes, cached
   Secret       : <Set>
.... .... .... ....

   DTMFmode     : rfc2833
   Timer T1     : 500
   Timer B      : 32000
   ToHost       :
   Addr->IP     : 11.22.33.44:55018
   Defaddr->IP  : (null)
   Prim.Transp. : UDP
   Allowed.Trsp : UDP
   Def. Username: 660091086
   SIP Options  : (none)
   Codecs       : (alaw|g729|gsm)
   Auto-Framing : No
   Status       : OK (31 ms)
   Useragent    : Cisco/SPA508G-7.5.2
   Reg. Contact : sip:660091086 at 192.168.1.12:5064
   Qualify Freq : 120000 ms
   Keepalive    : 0 ms
   Sess-Timers  : Accept
   Sess-Refresh : uas
   Sess-Expires : 1800 secs
   Min-Sess     : 90 secs
   RTP Engine   : asterisk
   Parkinglot   :
   Use Reason   : No
   Encryption   : No
   RTCP Mux     : Yes


MySQL database table data :

SELECT name, host, nat, type, qualify, fullcontact, ipaddr, port, 
regserver, regseconds, lastms, defaultuser FROM sip_buddies WHERE 
defaultuser='660091086'
+-----------+---------+---------------------+--------+---------+-------------+--------+------+-----------+------------+--------+-------------+
| name      | host    | nat                 | type   | qualify | 
fullcontact | ipaddr | port | regserver | regseconds | lastms | 
defaultuser |
+-----------+---------+---------------------+--------+---------+-------------+--------+------+-----------+------------+--------+-------------+
| 660091086 | dynamic | force_rport,comedia | friend | yes |             
|        |    0 |           |          0 |      0 | 660091086   |
+-----------+---------+---------------------+--------+---------+-------------+--------+------+-----------+------------+--------+-------------+



According to Asterisk console, the SIP peer is Registered and qualify 
(SIP OPTION) is fine (31 ms).

According to Mysql data, the SIP peer has no "fullcontact", no "ipaddr", 
no "port" and 0 (zero) regseconds and 0 (zero) lastms. While I would 
expect this to be filled in and/or has values higher than 0 (zero).



Is there an explanation for this "difference" in data ?!




Kind regards


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20210420/5ccee58c/attachment.html>


More information about the asterisk-users mailing list