Adding more than one IP to sip.conf tcpbindaddr and udpbindaddr (Asterisk 1.8)

asterisksiptcpudpvoip

The defaults in the sample sip.conf under Asterisk1.8 contain udpbindaddr=0.0.0.0 and tcpbindaddr=0.0.0.0. I want to bind the incoming [foo] extension to udp:192.168.1.1/255.255.255.0, the outgoing [foo] to tcp:192.168.3.3/255.255.255.0, the incoming [bar] to tcp:192.168.3.3/255.255.255.0, and the outgoing [bar] to udp:192.168.4.4/255.255.255.0.

The topology as follows:

Softphone(192.168.1.1 [foo]) udp-> asteriskserver_0(192.168.2.2) tcp-> another server(192.168.3.3) tcp-> asteriskserver_0(192.168.2.2) udp-> hardphone(192.168.4.4 [bar]).

My original question was 'how to set the {udp,tcp}addr= variable to handle more than one IPs', but the more general question is how to configure the sip.conf and the extensions.conf?

Best Answer

Asterisk can bind to single ip or to all ip same port. No other options.

If you expect different ports on different interfaces, you have setup more advanced(and much more complex) sip proxy, like opensips/kamailio.

Related Topic