[asterisk-users] Is this doable?

Gordon Messmer yinyang at eburg.com
Fri Feb 3 01:39:41 CST 2012


On 02/01/2012 04:48 PM, Josh wrote:
> The purpose of registering this external account is so that both the
> smart phones (tun0) and the internal net (eth1) users could use this
> account to make external calls (starting with "0", i.e "_0[0-9]."
> pattern in extensioins.conf). Obviously, I need these calls to be routed
> properly via the external VOIP account. In addition to that, I would
> also need to receive calls from that external account to a nominated
> internal one (say on extension 20).
>
> Is this achievable?

I can't see any reason it shouldn't be.

> 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.

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.

> If not, then my plan is to use
> external program to find it and then use a script in Asterick to set it
> up as an environment variable. Would that work?

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".

> I am also not sure whether to specify
> "nat=yes" or just have "nat=route" only - any ideas?

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.

> 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.

> 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.



More information about the asterisk-users mailing list