Thanks Atis, its working pretty fine now.

Best regards,
Mauro.



Atis Lezdins escreveu:
> On Wed, Aug 26, 2009 at 12:11 AM, Mauro Sergio Ferreira
> Brasil<mauro.bra...@tqi.com.br> wrote:
>   
>> Hello there!
>>
>> Problem found.
>>
>> For some reason, the update statement below is generated with an invalid
>> atribution of empty value '' to field "port" that is an integer.
>> Because of that, this record keeps with prior "fullcontact" information
>> that was updated by another client (which uses a different port) what
>> leads to wrong client rtp packets routing... wow... that was weird... :-)
>>
>> [Aug 25 17:57:43] DEBUG[20801] res_config_mysql.c: MySQL RealTime:
>> Query: UPDATE sip_buddies SET fullcontact = '', ipaddr = '', port = '',
>> regseconds = '0', username = '', regserver = '' WHERE name = '101'
>> [Aug 25 17:57:43] DEBUG[20801] res_config_mysql.c: MySQL RealTime: Query
>> Failed because: Incorrect integer value: '' for column 'port' at row 1
>>
>> First of all... my appologies by the false alarm.
>> But now I need your help to identify why is this update statement being
>> generated wrongly.
>>
>> Does someone have any idea ?
>>     
>
> Asterisk Realtime Architecutre currently treats all fields as strings.
> I wish too that it would take into account actual field type retrieved
> from DESCRIBE statement and add the quotes only if it's string.
>
> You can safely do
>
> ALTER TABLE sip_buddies CHANGE COLUMN port port VARCHAR(5);
>
> Regards,
> Atis
>
>   

-- 
__At.,                                                                          
                                                   
   _
 
*Technology and Quality on Information*
Mauro Sérgio Ferreira Brasil
Coordenador de Projetos e Analista de Sistemas
+ mauro.bra...@tqi.com.br <mailto:@tqi.com.br>
: www.tqi.com.br <http://www.tqi.com.br>
( + 55 (34)3291-1700
( + 55 (34)9971-2572


_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to