Discussion:
[asterisk-users] Realtime with "rtcachefriends=no" problems...
Mauro Sergio Ferreira Brasil
2009-08-25 19:47:16 UTC
Permalink
Hello there!

I was testing Asterisk for the last two weeks using the Realtime driver
for MySQL, and leaving "rtcachefriends=yes" configured to enable MWI.
Today I started making additional tests with "rtcachefriends=no" because
we will probably need to use Asterisk without this cache.

For some strange reason, calls stop to get routed between the SIP clients.
I've registered successfuly with two sip clients as usual, but the call
indication that I have on originator client (call in progress) don't
match with the target client that indicates nothing at all.

Using Wireshark I could see lots of ICMP errors being returned from the
target machine with "Destination Unreachable"/"Port Unreachable"
indications.
And this happens on both ways, client 1 calling client 2 and vice-versa.

I switched back to "rtcachefriends=yes" and all worked fine again.
(note: always I change "rtcachefriends" to "no", I change "qualify"
parameter of all SIP users to "no" as well - to avoid warnings on CLI).
Does anyone had this problem ?

What Am I missing here ?

Thanks and best regards,
--
__At.,
_

*Technology and Quality on Information*
Mauro Sérgio Ferreira Brasil
Coordenador de Projetos e Analista de Sistemas
+ ***@tqi.com.br <mailto:@tqi.com.br>
: www.tqi.com.br <http://www.tqi.com.br>
( + 55 (34)3291-1700
( + 55 (34)9971-2572
Mauro Sergio Ferreira Brasil
2009-08-25 21:11:48 UTC
Permalink
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 ?

Thanks and best regards,
Mauro.
Post by Mauro Sergio Ferreira Brasil
Hello there!
I was testing Asterisk for the last two weeks using the Realtime
driver for MySQL, and leaving "rtcachefriends=yes" configured to
enable MWI.
Today I started making additional tests with "rtcachefriends=no"
because we will probably need to use Asterisk without this cache.
For some strange reason, calls stop to get routed between the SIP clients.
I've registered successfuly with two sip clients as usual, but the
call indication that I have on originator client (call in progress)
don't match with the target client that indicates nothing at all.
Using Wireshark I could see lots of ICMP errors being returned from
the target machine with "Destination Unreachable"/"Port Unreachable"
indications.
And this happens on both ways, client 1 calling client 2 and vice-versa.
I switched back to "rtcachefriends=yes" and all worked fine again.
(note: always I change "rtcachefriends" to "no", I change "qualify"
parameter of all SIP users to "no" as well - to avoid warnings on CLI).
Does anyone had this problem ?
What Am I missing here ?
Thanks and best regards,
--
__At.,
_

*Technology and Quality on Information*
Mauro Sérgio Ferreira Brasil
Coordenador de Projetos e Analista de Sistemas
+ ***@tqi.com.br <mailto:@tqi.com.br>
: www.tqi.com.br <http://www.tqi.com.br>
( + 55 (34)3291-1700
( + 55 (34)9971-2572
Atis Lezdins
2009-08-26 10:04:32 UTC
Permalink
On Wed, Aug 26, 2009 at 12:11 AM, Mauro Sergio Ferreira
Post by Mauro Sergio Ferreira Brasil
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... :-)
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
--
Atis Lezdins,
VoIP Project Manager / Developer,
IQ Labs Inc,
***@iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Cell Phone: +1 800 7300689
Work phone: +1 800 7502835
Mauro Sergio Ferreira Brasil
2009-08-26 13:35:30 UTC
Permalink
Thanks Atis, its working pretty fine now.

Best regards,
Mauro.
Post by Atis Lezdins
On Wed, Aug 26, 2009 at 12:11 AM, Mauro Sergio Ferreira
Post by Mauro Sergio Ferreira Brasil
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... :-)
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
+ ***@tqi.com.br <mailto:@tqi.com.br>
: www.tqi.com.br <http://www.tqi.com.br>
( + 55 (34)3291-1700
( + 55 (34)9971-2572
Loading...