/* Search through trunked calls for a match with this peer */
for (x=TRUNK_CALL_START;x<maxtrunkcall; x++) {
ast_pthread_mutex_lock(&iaxsl[x]);
+#if 0
+ if (iaxtrunkdebug)
+ ast_verbose("Call %d is at %s:%d (%d)\n", x, inet_ntoa(iaxs[x]->addr.sin_addr), ntohs(iaxs[x]->addr.sin_port), iaxs[x]->addr.sin_family);
+#endif
if (iaxs[x] && iaxs[x]->trunk && iaxs[x]->trunkdatalen && !memcmp(&iaxs[x]->addr, &peer->addr, sizeof(iaxs[x]->addr))) {
if (iaxtrunkdebug)
ast_verbose(" -- Sending call %d via trunk to %s:%d\n", x, inet_ntoa(iaxs[x]->addr.sin_addr), ntohs(iaxs[x]->addr.sin_port));
processed++;
res = send_trunk(peer);
if (iaxtrunkdebug)
- ast_verbose("Processed trunk peer '%s' with %d call(s)\n", peer->name, res);
+ ast_verbose("Processed trunk peer '%s' (%s:%d) with %d call(s)\n", peer->name, inet_ntoa(peer->addr.sin_addr), ntohs(peer->addr.sin_port), res);
totalcalls += res;
res = 0;
}
if (!peer->authmethods)
peer->authmethods = IAX_AUTH_MD5 | IAX_AUTH_PLAINTEXT;
peer->delme = 0;
+ /* Make sure these are IPv4 addresses */
+ peer->addr.sin_family = AF_INET;
}
return peer;
}