simple Asterisk setup for LAN
Asked Answered
F

3

5

I have been going back and forth trying out wanting to find a way for a way to communicate via LAN / WiFi easily, and making a call via LAN network would be great, so i tried asterisk a few times and lost in the way, i cant seem make it work, and the e-book i purchased endorsed me to purchase a Digium hardwares to proceed, it's not possible for me to do so, i live halfway around the world from america and a day's flight from a big city.

I'm willing to learn, but it seems each time i went in it, i got lost somehow. i know basics of linux and virtualbox, but not too much though, and this asterisk felt it's still another level for me.

My question is, is it possible to use asterisk or asterisknow by digium without their hardwares if it's only for LAN usage ? is it even a viable thing to do ?

Flamenco answered 18/6, 2013 at 12:32 Comment(1)
"a Digium hardwares" you mean an FXO/FXS card? You only need those if you want to attach it to a real phone network via a phone line you have, or plug non-VoIP phones into it. Or if you mean a pre-installed appliance then one of the dedicated Linux distros would be easier to get I'd think.Saunderson
C
5

Of course it is possible.
All you need is one server and two sip phones, SW or HW to make them talk to each other.

so on the server where you installed asterisk set two peers in /etc/asterisk/sip.conf:
(this is just an example)

[101]
disallow=all
host=192.168.1.3 ; IP address of your first phone
;secret=101 ;uncomment if you want to use host=dynamic, less secure, use 'bigger' secret
type=friend
dtmfmode=rfc2833
allow=alaw
qualify=yes
canreinvite=yes
insecure=port
context=dial-local

[102]
disallow=all
host=192.168.1.4 ; IP address of your second phone
;secret=102 ;uncomment if you want to use host=dynamic, less secure, use 'bigger' secret
type=friend
dtmfmode=rfc2833
allow=alaw
qualify=yes
canreinvite=yes
insecure=port
context=dial-local

than in your /etc/asterisk/extensions.conf set context dial-local like:

[dial-local]
exten => _X.,1,n,Dial(SIP/${EXTEN})

Than you need to reload your new configurations from asteriskCLI> dialplan reload and sip relaod or execute in terminal:

asterisk -rx "dialplan reload";
asterisk -rx "sip reload";

all you need to do now is to register your 2 phone to server
You can chose from many free SW phone out there, I recommend 3CX for Win/Android and Linphone for Linux.

On the softphone all you need to configure is username (101 and 102), secret (101 and 102) and server IP (192.168.1.2 in this case).
Now start up server and both phones, and if you see them 'on hock', dial 102 or 101 :)

Callista answered 18/6, 2013 at 12:56 Comment(0)
D
2

Your question is a bit difficult to understand, but I'll take a stab at it anyway. Yes, you can use Asterisk via LAN only if what you want to do is "desk to desk" calls. That is the entire concept behind Voice Over IP -- no need for traditional copper pair wires.

The two protocols you will want to look into most are SIP and IAX2. Check the links below for reading material you'll need to study up on.

If you're familiar with "LAMP" server environments, you should have no serious difficulties in getting an Asterisk PBX set up and able to make a call between two SIP phones.

Good luck with it!

Defector answered 18/6, 2013 at 13:5 Comment(2)
"and IAX2" you'd only need IAX2 if you were running more than one Asterisk system, or e.g. you wanted to attach your Asterisk to an upstream telecoms provided who would attach you to the real telecoms network and talked IAX2.Saunderson
Actually, several soft and hard phones support IAX2. So you can use either. And if you need to cross a firewall with NAT, IAX2 to the phone makes everything simple.Defector
I
0

Asterisk is an open source project - you can run calls through it without paying Digium a penny. They offer great value extensions e.g. telephones, phone cards and asterisk turnkey systems - it is a balance between how much effort you wish to spend.

There are free sip providers out there too - so Asterisk + a SIP gateway + a SIP client will allow you to make and receive calls without spending a penny / cent!

Indentation answered 19/2, 2014 at 18:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.