[asterisk-users] Is this doable?

Josh mojo1736 at privatedemail.net
Fri Feb 3 16:52:52 CST 2012


> I can't see any reason it shouldn't be.
At this stage, after reading for the past couple of days, my two main 
concerns are NAT handling of SIP as both the Asterisk & my clients will 
be behind a firewall on a private net, and multitasking - the latter 
*may* be solved by going with AGI (not sure yet as Asterisk is still 
completely new to me).

I figured out most of the things which had me worried initially, 
including how to get multiple "register" entries for external providers 
using (non-standard) ports (in v10.0 there is a provision for this in 
sip.conf).

>> If so, I am not completely clear on whether I need to explicitly specify
>> my public IP address (via externip/externhost) or whether Asterick is
>> able to find it without this option?
>
> As I understand it, that depends on your router.  If you have a Linux 
> router with the ip_nat_sip module, it'll "fix" your SIP packets so 
> that you don't need to use the externip setting.  However, you'll need 
> to test to verify that.
Nope! My eth0 interface is not facing the public Internet directly - it 
takes its IP address from my ISP's DHCP (which is private!) even though 
it can forward/pass traffic through the public internet via that 
interface, that is the problem.

> Asterisk won't be able to figure out your external address on its own, 
> so if your firewall isn't fixing packets, then you'd need to specify 
> externip.
I had a brief look at the sip.conf(.sample) for v10.0 and there is a 
provision for activating STUN (application/module) to figure out what my 
"real" public address is - if it works, then I may as well go using 
this, otherwise I will have to use a separate program to do that job.

> http://www.voip-info.org/wiki/view/Asterisk+variables
> According to the information here, you should be able to use 
> ${ENV(externip)} to reference the value of an environment variable 
> named "externip".
Thanks, that was good, but this is better  ;-) -> 
http://www.voip-info.org/wiki/view/Asterisk+Detailed+Variable+List

> http://www.asteriskguru.com/tutorials/sip_nat_oneway_or_no_audio_asterisk.html 
>
> For a SIP trunk... no, I don't.  The above link may be useful as it 
> describes NAT issues with SIP.  If you have to specify NAT options at 
> all, start with "yes" and try "route" if that doesn't work.
Very good find, thanks again!

>> Is there a comprehensive list of all the options available in sip.conf
>> and what they do, because I was unable to find such a list?
>
> http://www.voip-info.org/wiki/view/Asterisk+config+sip.conf
> I wish I knew.  The link above seems fairly complete, but also terse.
Top find again, thanks! It is a bit dated, but it certainly helps and 
I've got a few ideas of my own from this page.

>> One final question about binding: in order to be able to use both tun0
>> and eth1 interfaces so that Asterick serves the calls from both eth1 and
>> tun0, do I have to use "bind 0.0.0.0"? Is there an alternative, like
>> specifying "bind 10.1.1.1" for eth1 and then "bind 10.1.2.1" for the
>> tun0 interface - is this possible?
>
> Start with binding to 0.0.0.0.
That was my initial intention as I was hoping Linux will map each 
request/response using the appropriate interface (i.e. on which 
interface it comes from), I realise binding on 0.0.0.0. is not ideal 
from a security point of view (I'd rather issue separate udpbind 
statements for the interfaces I want to use), but for now it have to do 
if there isn't an alternative.

Many thanks for your input, much appreciated.



More information about the asterisk-users mailing list