[asterisk-users] direct IP calling with extension

Anselm Martin Hoffmeister anselm at hoffmeister-online.de
Fri Dec 1 12:08:34 MST 2006


Am Freitag, den 01.12.2006, 13:44 -0500 schrieb Jerry Geis:
> All,
> 
> If I have video phones behind an asterisk server (with 2 network cards)
> and all the phones have extensions. Internally everything works great.
> 
> Now for people that want to call my video phones external to my office
> is there a way to do that? On the extenal persons phone enter an IP/EXTEN
> where IP is my server and not the phone? Can that work?
> 
> Would I have to have PUBLIC IP address for every phone NAT'ed through my
> server to make the call?

AFAIR, define a "context" in the global section of sip.conf. Any
incoming SIP connections that are not identified to belong to any other
context (registration) will come thru that extensions.conf context.
Inside, just "forward" through to your proper local extensions:

[locals]
exten => 200,1,Dial(SIP/myphone1)
...
[sipfromoutside]
exten => johndoe,1,Goto(locals,200,1)
...

Then direct IP calling as   johndoe at 123.45.67.89
should work. To get calling at a hostname working as well, you will need
a few records in your DNS setup.

example.com. IN A 123.45.67.89
sip.example.com. IN A 123.45.67.89
example.com. IN NAPTR 60 50 "s" "SIP+D2U" "" _sip.udp.example.com.
_sip._udp.example.com. IN SRV 10 10 5060 sip.example.com.

Which will allow for johndoe at example.com
I suspect the first "example.com" line is not necessary (such that you
can host your domain on a different server than that which runs
Asterisk), but I did not test.

HTH
Anselm



More information about the asterisk-users mailing list