Steve Murphy wrote:
iaxclient tries to bind to port 4569, but should use a transient port if binding to port 4569 fails. This makes it possible for iaxclient to receive calls without requiring registration. I've never tested this on windows, but it works fine under Linux.--On Tuesday, December 21, 2004 9:37 AM -0700 Steve Murphy <[EMAIL PROTECTED]> wrote: Here's the code: if (preferredportno > 0) { sin.sin_family = AF_INET; sin.sin_addr.s_addr = 0; sin.sin_port = htons((short)preferredportno); if (bind(netfd, (struct sockaddr *) &sin, sizeof(sin)) < 0) { DEBU(G "Unable to bind to preferred port. Using random one instead."); } } sinlen = sizeof(sin); if (getsockname(netfd, (struct sockaddr *) &sin, &sinlen) < 0) { close(netfd); netfd = -1; DEBU(G "Unable to figure out what I'm bound to."); IAXERROR "Unable to determine bound port number."); } The situation you describe should work; you will have failures, though, if both clients try to access the same audio devices, and your drivers/os don't permit that. -SteveK |
_______________________________________________ Asterisk-Users mailing list [email protected] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
