[asterisk-users] chan_sip sending from wrong source address when multiple interfaces are used
Kevin P. Fleming
kpfleming at digium.com
Thu Jul 12 16:12:08 CDT 2012
On 07/12/2012 03:53 PM, Benny Amorsen wrote:
>> chan_sip does have the ability to use connect()-ed sockets for dialogs
>> now, since that is required for TCP, TLS and WebSocket support. It
>> wouldn't be a huge leap to use them for UDP as well, if that was
>> beneficial.
>
> It would be greatly appreciated :) It is low priority for the Asterisk
> project, as there are always workarounds.
I've just looked into this a bit, and I don't see how using connect()
would actually solve the problem. If we receive a UDP datagram from a
SIP endpoint, we could use socket() and connect() to create a socket
specifically for sending to (and receiving from) that endpoint in the
future, but we can't specify the source address to be used by that
socket. The only way I know of to specify the source address for
outbound packets is to use a raw socket and compose the IP header
ourselves, which would be overkill.
Benny, are you aware of some other method to accomplish this?
--
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
Jabber: kfleming at digium.com | SIP: kpfleming at digium.com | Skype: kpfleming
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at www.digium.com & www.asterisk.org
More information about the asterisk-users
mailing list