Summary:ASTERISK-17447: Realtime field 'fullcontact' populated with invalid data
Reporter:stc-admin (stc-admin)Labels:
Date Opened:2011-02-21 05:13:29.000-0600Date Closed:2011-02-24 08:05:48.000-0600
Versions: Frequency of
Description:I have the exact the same issue as stated here, with Asterisk https://issues.asterisk.org/view.php?id=18251

Using Asterisk realtime, the field 'fullcontact' is populated with invalid data. The result is that warnings occur when a Counterpath Bria 3 Softphone re-registers after Asterisk has been restarted.

In my case, after a softphone registers, the field contains something like:

The warnings are:

[Feb 21 10:22:58] WARNING[28196] chan_sip.c: Invalid contact uri speo-hrahr12187.3:27;isac=d985cdff (missing sip: or sips:), attempting to use anyway
[Feb 21 10:22:58] WARNING[28196] chan_sip.c: Invalid host name in Contact: (can't resolve in DNS) : 'spts@'


Working on CentOS with the Asterisk yum package.

The back end database is MySQL accessed over ODBC.
The 'fullcontact' field is defined as a varchar(80). Deleting the fullcontact column as a workaround  causes other problems.

I understand that the field should contain something like: 'sip:test@;line=wkya7tfd'

The solution: only every odd character is stored in the database. In res/res_config_odbc.c there is a for-loop which cycles through every character in the string:

for (; *vptr && eptr < encodebuf + sizeof(encodebuf); vptr++)

The problem appears to be that there are two occurrances of vptr++ elsewhere:

*eptr++ = *vptr++;
Comments:By: stc-admin (stc-admin) 2011-02-21 05:15:29.000-0600

It's, not

By: Michael L. Young (elguero) 2011-02-21 08:47:55.000-0600

This was fixed after was tagged as a release candidate.

So, you can wait for the next release or patch the version you have.

By: Leif Madsen (lmadsen) 2011-02-21 15:29:51.000-0600

Already fixed.