[OpenSIPS-Users] Invalid contacts in location table, TCP timeout

Fabian Bernhard fbernhard at gmail.com
Mon Oct 22 12:34:21 CEST 2012


Dear list

We develop SIP clients and have an OpenSIPS 1.8.0 test server. We are bound
to use TCP and frequently kill the clients without unregistering. This
leads to invalid contacts in the location table.

It often takes a long time for an INVITE or MESSAGE to be forwarded by the
server. In syslog we see a lot of these entries:

Oct 18 14:55:50 Debian-60-squeeze-64-minimal /usr/sbin/opensips[11050]:
ERROR:core:tcp_blocking_connect: timeout 10 s elapsed from 10 s
Oct 18 14:55:50 Debian-60-squeeze-64-minimal /usr/sbin/opensips[11050]:
ERROR:core:tcpconn_connect: tcp_blocking_connect failed
Oct 18 14:55:50 Debian-60-squeeze-64-minimal /usr/sbin/opensips[11050]:
ERROR:core:tcp_send: connect failed
Oct 18 14:55:50 Debian-60-squeeze-64-minimal /usr/sbin/opensips[11050]:
ERROR:tm:msg_send: tcp_send failed
Oct 18 14:55:50 Debian-60-squeeze-64-minimal /usr/sbin/opensips[11050]:
ERROR:tm:t_forward_nonack: sending request failed

I think that OpenSIPS tries to forward the messages to all contacts in the
location table, one contact after the other. Because some of them are not
valid anymore the server is unable to send the message. This means that it
takes 30 seconds for an INVITE to be received if there are 3 old contacts
in the location table, due to the 10 seconds timeout.

I have hoped that the following configuration would resolve the problem. I
thought it would make OpenSIPS to send the message to the most recent
contact first:

modparam("usrloc", "desc_time_order", 1)

It turned out that this is not the case, for whatever reason.

My questions:

1/ Is this behavior normal and expected? I.e. waiting 10 seconds for the
TCP timeout before trying the next contact in the location table?
2/ Is there a way to configure OpenSIPS to a) send the messages in parallel
to all contacts and b) to delete invalid contacts from location table upon
above error?
3/ Can I reduce the TCP timeout to something like 2 seconds? If yes: how?

Thanks and best regards

Fabian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20121022/6d0a80d4/attachment.htm>


More information about the Users mailing list