Cannot Connect:


When I am sending calls in bulk I am getting this warning:

What does this mean ?

Asterisk tries to set up a socket with the address of the peer, so that it can find the address of the interface that would be used, as it needs this to correctly complete the SIP headers. It can then use a socket shared across all SIP traffic for the actual dialogue. The connect system call failed whilst doing this. If there is only one interface, the fallback should work.

However, failing to connect here could indicate a misconfiguration of the OS routing tables.

s = socket(PF_INET, SOCK_DGRAM, 0); sin.sin_family = AF_INET; sin.sin_port = 5060; sin.sin_addr = *them; if (connect(s, (struct sockaddr *)&sin, sizeof(sin))) { ast_log(LOG_WARNING, "Cannot connect\n"); close(s); return -1; }

Where I have to write this code ?

Nowhere. That is the code that currently produces the message, to help you understand what it means.