[Home]

Summary:ASTERISK-16123: [patch] realtime shows 2x fullcontact if delimited by ';'
Reporter:Andreas Koch (gkservice)Labels:
Date Opened:2010-05-21 02:00:20Date Closed:2010-07-17 12:41:00
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Functions/func_realtime
Versions:Frequency of
Occurrence
Related
Issues:
is related toASTERISK-17959 Buffer overflow in custom_prepare
Environment:Attachments:( 0) 20100625__issue17369.diff.txt
Description:in mysql we can see:
>>>>>>>>>
mysql> select name, port, fullcontact, ipaddr from sip_buddies where name = '746';
+------+------+-----------------------------------------+--------------+
| name | port | fullcontact                             | ipaddr       |
+------+------+-----------------------------------------+--------------+
| 746  | 5060 | sip:746@192.168.3.24:5060;transport=udp | 192.168.3.24 |
+------+------+-----------------------------------------+--------------+
1 row in set (0.00 sec)
>>>>>>>>>
but " realtime load sippeers name 746" shows
>>>>>>>>>
name  746
fullcontact  sip:746@192.168.3.24:5060
fullcontact  transport=udp
ipaddr  192.168.3.24
port  5060
>>>>>>>>>
so with this the dialplan function "REALTIME" shows only the last fullcontact Entry (transport=udp) and not all fullcontact
Comments:By: Dmitry Andrianov (dimas) 2010-05-27 19:01:32

realtime is just broken because it does that splitting deep inside. I was writing about exactly this problem to dev- list in 2007 -
http://lists.digium.com/pipermail/asterisk-dev/2007-September/029763.html



By: Tilghman Lesher (tilghman) 2010-06-25 17:22:46

This should solve it, by encoding fields with semicolons embedded.  AFAIK, there is nothing in Asterisk currently that stores multiple fields directly and expects them to come back separately.  We'll probably have to eventually provision for that, but this should solve the issue in the meantime.

By: Digium Subversion (svnbot) 2010-07-16 16:54:28

Repository: asterisk
Revision: 277568

U   branches/1.4/res/res_config_odbc.c
U   branches/1.4/res/res_config_pgsql.c

------------------------------------------------------------------------
r277568 | tilghman | 2010-07-16 16:54:28 -0500 (Fri, 16 Jul 2010) | 8 lines

Since we split values at the semicolon, we should store values with a semicolon as an encoded value.

(closes issue ASTERISK-16123)
Reported by: gkservice
Patches:
      20100625__issue17369.diff.txt uploaded by tilghman (license 14)
Tested by: tilghman

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=277568

By: Digium Subversion (svnbot) 2010-07-17 12:39:27

Repository: asterisk
Revision: 277773

_U  trunk/
U   trunk/addons/res_config_mysql.c
U   trunk/include/asterisk/config.h
U   trunk/main/config.c
U   trunk/res/res_config_odbc.c
U   trunk/res/res_config_pgsql.c

------------------------------------------------------------------------
r277773 | tilghman | 2010-07-17 12:39:27 -0500 (Sat, 17 Jul 2010) | 15 lines

Merged revisions 277568 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
 r277568 | tilghman | 2010-07-16 16:54:29 -0500 (Fri, 16 Jul 2010) | 8 lines
 
 Since we split values at the semicolon, we should store values with a semicolon as an encoded value.
 
 (closes issue ASTERISK-16123)
  Reported by: gkservice
  Patches:
        20100625__issue17369.diff.txt uploaded by tilghman (license 14)
  Tested by: tilghman
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=277773

By: Digium Subversion (svnbot) 2010-07-17 12:41:00

Repository: asterisk
Revision: 277774

_U  branches/1.6.2/
U   branches/1.6.2/res/res_config_odbc.c
U   branches/1.6.2/res/res_config_pgsql.c

------------------------------------------------------------------------
r277774 | tilghman | 2010-07-17 12:40:59 -0500 (Sat, 17 Jul 2010) | 22 lines

Merged revisions 277773 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r277773 | tilghman | 2010-07-17 12:39:28 -0500 (Sat, 17 Jul 2010) | 15 lines
 
 Merged revisions 277568 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r277568 | tilghman | 2010-07-16 16:54:29 -0500 (Fri, 16 Jul 2010) | 8 lines
   
   Since we split values at the semicolon, we should store values with a semicolon as an encoded value.
   
   (closes issue ASTERISK-16123)
    Reported by: gkservice
    Patches:
          20100625__issue17369.diff.txt uploaded by tilghman (license 14)
    Tested by: tilghman
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=277774