Asterisk telephone PBX (and more)

Business software, financial software, etc.
Post Reply
Message
Author
jza
Posts: 22
Joined: Fri 17 Nov 2006, 18:14
Location: GDL
Contact:

Asterisk telephone PBX (and more)

#1 Post by jza »

I did a quick search before asking but didnt found much info about it. So the question is, has anyone been able to run Asterisk on puppy.

I got some of those cool norhtec MicroClient and I wonder if I can have an asterisk server with it. I am not sure if I can download compilers and all that from pup since I just havent tried it enough but I hope this is possible.

please anyone comment on having this setup.
Puppy on a MicroClient Jr

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#2 Post by rarsa »

The question that comes to mind is WHY?

If you plan to have an asterix box the best route is to install trixbox.
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to

phizone
Posts: 4
Joined: Thu 14 Dec 2006, 01:28
Contact:

#3 Post by phizone »

I had the 1.2 branch of asterisk working on puppy 2.10. The 1.4 branch should be easier to package, since you can use a install prefix when building. If you want the conferencing to work, the zaptel kernel modules must be available to use for timing. After I read the new docs on petgets, I'll see if I can package 1.4 for puppy.

As for why one would want a live distro running asterisk, there are several reasons. Droops and I have been working on the slast distro for a while and we've found it a handy way to show off the features of asterisk by simply booting the disk and using some scripts we wrote to save/restore the configs via (s)ftp. In a matter of minutes, you can have your pbx up and running at a remote site and be able to send and receive calls as normal. Also, as compared to trixbox, it has the advantage of forcing you to understand how the asterisk configs work and gives you much more flexibility in your dialplan in the long run.

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#4 Post by rarsa »

phizone wrote:Also, as compared to trixbox, it has the advantage of forcing you to understand how the asterisk configs work and gives you much more flexibility in your dialplan in the long run.
Actually my question was directly related to this.

My impression is that Asterix configuration is not a cup of tea and that Trixbox provides utilities to simplify the administration.

Of course I've just got my information from reading and a couple of local Linux users group's presentations. I have not set it up.

Thank you for clarifying one of the purposes. I was just thinking from the end user point of view.

Regards.
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#5 Post by Flash »

Would someone please explain what Asterix, or Asterisk or whatever it's called, does? Is it a server program or what? What is it used for?

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#6 Post by rarsa »

Asterisk is a complete PBX in software. It runs on Linux, BSD, Windows and OS X and provides all of the features you would expect from a PBX and more. Asterisk does voice over IP in four protocols, and can interoperate with almost all standards-based telephony equipment using relatively inexpensive hardware.
PBX=Private branch exchange.

In some places they call it commuter.

It is the box that sits in front of all the phones in an office that routes calls to the appropriate extension.

Of course modern PBX systems do more than that such as recording voicemail, recording calls, providing menu driven information (for customer service please press 1... etc)

That's asterix.
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to

phizone
Posts: 4
Joined: Thu 14 Dec 2006, 01:28
Contact:

#7 Post by phizone »

Since I love asterisk I wanted to add a bit more info to this. :)

Trixbox is very cool and probably a good way to get started with asterisk. For most end users it will probably meet their needs fine in the long term. Writing your own configs/dialplans does have a steep learning curve at first, but it's not too bad after the first couple of weeks.

As a quick intro to asterisk for the uninitiated, as rarsa said at it's core it's just a phone switch in software. It has voicemail, call queues, music on hold, conferencing, call monitoring and recording, message waiting indication, text to speech, and several other nice features. The best thing about it though is that it supports running scripts in response to dialed inputs which means you can build applications to suit your needs. For instance, you can fairly easily build a script and dialplan to implement an automated wake-up call. Or create a small app that will tie into X10 applications and let you call home and dial an extension and passcode to turn on your front porch light or adjust the thermostat before you get there. There are also functions to push and pull data from a sql database, so the options really are endless.

For those interested here are some great resources:
Asterisk website: http://asterisk.org
Asterisk section of a great voip wiki: http://www.voip-info.org/wiki/index.php?page=Asterisk
Asterikast video blogs: http://www.asterikast.com/modules.php?n ... load&cid=7

Sorry if I get too excited about it, but I really think asterisk is a killer app in the same vein as apache or mysql...

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#8 Post by Flash »

Thank you. :)

JohnMc
Posts: 118
Joined: Fri 07 Apr 2006, 15:18

#9 Post by JohnMc »

But Wait there is more!! For...

Not only is Asterisk a pbx but it can be an entire interbranch exchange environment via their IAX protocol. Simply put a far flung enterprise in mulitple cities could set up private prefixes so that a call from Dallas to Chicago could be programmed as *54 (for Chicago) and then the internal Nxx station ID. And it still be treated as a local call.

I have only fooled with it a little but it's powerful stuff. With the right hardware you too could be the next HSC!

jza
Posts: 22
Joined: Fri 17 Nov 2006, 18:14
Location: GDL
Contact:

ahem...

#10 Post by jza »

ahem.... english please :lol:

interbranch exchange environment?....IAX protocol?....far flung enterprise?....private prefixes?....internal Nxx station ID?...Dallas?

somewhere along those lines I got you mentioning asterisk and chicago. For the rest I didn't know what you were talking about.
Puppy on a MicroClient Jr

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

Re: ahem...

#11 Post by rarsa »

jza wrote:For the rest I didn't know what you were talking about.
A phone system with all the features that a big company or hotel phone system has.

You could have several Voip phone numbers ($2.50 per month each) and you and each of your children (or parents) could have their own phone number with voice mail and etc.

Or if you have a company, even if it is a one person company, you could have a phone system with a menu that says "welcome to jza industries, for techincal support press one... etc"

Or maybe you route your office number and your cell phone so when you are not at home, the right phone would ring.

Etc. I hope you get the idea, if not, go to the trixbox home page.
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to

jza
Posts: 22
Joined: Fri 17 Nov 2006, 18:14
Location: GDL
Contact:

#12 Post by jza »

ok I got that.

Sorry I don't speak TELCO ;)
Puppy on a MicroClient Jr

jinxed
Posts: 10
Joined: Wed 28 Feb 2007, 00:24

#13 Post by jinxed »

phizone wrote:I had the 1.2 branch of asterisk working on puppy 2.10. The 1.4 branch should be easier to package, since you can use a install prefix when building. If you want the conferencing to work, the zaptel kernel modules must be available to use for timing. After I read the new docs on petgets, I'll see if I can package 1.4 for puppy.
I've tried (unsuccessfully) to complile both the latest 1.2 and 1.4 (stable) branches of asterisk. the first problem I encountered was easily fixable (asterisk expects awk to be in /usr/bin/). The second error I can't seem to resolve. The compile fails while compiling editline with a very non-descriptive error message. I believe it is possibly having problems finding the termcap headers.

Can you give me some guidance on how to compile asterisk for puppy?

woodeye18
Posts: 16
Joined: Sat 01 Oct 2005, 15:59
Location: Southern California
Contact:

#14 Post by woodeye18 »

In the spirit of small and lightweight apps, I have loaded Astlinux on a thumbdrive and booted it up first time, no probs....but! [big but]...astlinux is a stripped down version of asterisk that is so small and text based, that you would have to know how to hand edit lots of config files and know asterisk quite well to get it to make and receive calls. (unlike trixbox).

It would be great if you had the stripped down source for the astlinux (minus their linux kernel) and could add it to puppy.

http://www.astlinux.org/

timothyli
Posts: 65
Joined: Sun 22 Jun 2008, 07:44
Location: Toronto, Canada

asterisk pbx on puppy

#15 Post by timothyli »

I have searched for this topic on the web but could not find much. (Through trial and error), here are the steps I came up with to successfully install Asterisk 10 (latest) on an old Acer AspireOne netbook with 1G RAM and a 8G SSD, and make it a useful VOIP pbx box so I can have free Canada/US incoming and outgoing calls through Google Voice and freephoneline.ca as Trunks. The Atom CPU-based netbook is perfect as a pbx appliance because it does not generate much heat or consume much electricity even if it is on all the time.

1. Frugal install Puppylinux 5.2.8 (or your favourite flavour/version of Puppy) with devx.sfs loaded on the netbook so it can compile programs from source
2. Download iksemel source from http://code.google.com/p/iksemel, and extract source to a temporary folder (iksemel is needed to set up Google Voice Trunk)
3. Create a /usr/bin/libgnutls-config file to fix a iksemel compile issue (see http://code.google.com/p/iksemel/issues/detail?id=29); chmod +x /usr/bin/libgnutls-config
4. cd to the iksemel folder
5. ./configure --with-libgnutls-prefix=/usr --prefix=/usr
6. make && make install [iksemel is now installed]
7. Download Asterisk 10 source from http://www.asterisk.org/downloads
8. Extract source to a temporary folder
9. cd to the asterisk folder
10. ./configure --prefix=/usr
11. make menuselect (a menu will come up)
12. make sure channel gtalk and resource jabber are checked; also check optional sound in ulaw
13. make
14. make install
15. make samples (Asterisk 10 should be installed)
16. To make asterisk start up automatically on boot, add this line to /etc/rc.d/rc.local: /usr/sbin/safe_asterisk
17. To connect to a running asterisk, type asterisk -vvvvvvvvcr in a terminal
18 install openssh in puppy so it can be managed remotely
19. setup puppy firewall to allow (only) 22/tcp, 4569/udp, 5060/udp, 5222/tcp, 10000-20000/udp
20. set up port forward in router (22/tcp, 4569/udp, 5060/udp, 5222/tcp, 10000-20000/udp) for outside to reach the pbx
21. I'll share my asterisk config for a simple home telephone system using 2 trunks (Google Voice and freephoneline.ca) in the next post. Using this setup, I can make/receive free calls via my Android smartphone (or iphone for that matter) over mobile data/wifi without using up my mobile minutes.

I hope someone would find this useful. Comments/feedback is welcome.
Last edited by timothyli on Mon 23 Apr 2012, 17:03, edited 2 times in total.

timothyli
Posts: 65
Joined: Sun 22 Jun 2008, 07:44
Location: Toronto, Canada

asterisk on puppylinux

#16 Post by timothyli »

This is my simple Asterisk set up with 2 phones, one at home (extension 200) connecting with Linksys PAP2T, and the other one (extension 201) for my Android phone running the CSipSimple app. I use 2 trunks: freephoneline.ca for local calls and calls to major Canadian cities, and Google Voice for the rest of North America - all free.

sip.conf
---------
[general]
port=5060
disallow=all
allow=ulaw
allow=alaw
allow=gsm
nat=yes
externip=xxx.xxx.xxx ;;your internet-facing ip
localnet=192.168.1.0/255.255.255.0 ;;your internal local network

;; provided by freephoneline if you pay the $50
register => 14164567890:password@voip.freephoneline.ca/fpl

[fpl]
canreinvite=no
context=local
dtmfmode=auto
fromdomain=voip.freephoneline.ca
fromuser=14164567890
host=voip.freephoneline.ca
language=en
promiscredir=yes
qualify=no
secret=password ;;your freephoneline password
sendrpid=no
type=peer
defaultuser=14164567890
insecure=invite,port

;; I use extension 200 for my landline, and 201 for my mobile(Android)
[200]
type=friend
defaultuser=200
secret=password
host=dynamic
context=local
dtmfmode=auto
language=en
canreinvite=no


[201]
canreinvite=no
context=local
dtmfmode=auto
host=dynamic
language=en
secret=password
type=friend
defaultuser=201


extensions.conf
-----------------

;; use just one context for simplicity
[local]

;dial internal extensions 200 and 201
exten => 200,1,Dial(SIP/200,20)
exten => 200,n,VoiceMail(200@voicemail)
exten => 200,n,Hangup()

exten => 201,1,Dial(SIP/201,20)
exten => 201,n,VoiceMail(201@voicemail)
exten => 201,n,Hangup()

;dial *44 to playback message for testing
exten => *44,1,Answer()
exten => *44,n,Playback(tt-monty-knights)
exten => *44,n,Hangup()

;dial *43 for echo test
exten => *43,1,Answer()
exten => *43,n,Playback(welcome)
exten => *43,n,Playback(demo-echotest)
exten => *43,n,Echo()
exten => *43,n,Playback(vm-goodbye)
exten => *43,n,Hangup()

;outbound using freephoneline. Area codes 416,647,905 etc are free
; check http://www.freephoneline.ca/cityListing
exten => _416XXXXXXX,1,Dial(SIP/fpl/${EXTEN})
exten => _416XXXXXXX,n,Hangup()
exten => _647XXXXXXX,1,Dial(SIP/fpl/${EXTEN})
exten => _647XXXXXXX,n,Hangup()
exten => _905XXXXXXX,1,Dial(SIP/fpl/${EXTEN})
exten => _905XXXXXXX,n,Hangup()

;outbound using google voice if freephoneline not used
exten => _NXXXXXXXXX,1,Dial(gtalk/asterisk/+1${EXTEN}@voice.google.com)
exten => _NXXXXXXXXX,n,Hangup()


;inbound from google talk (gmail account is johndoe@gmail.com in this example)
exten => johndoe@gmail.com,1,Dial(SIP/201,20) ;;ring to extension 201
exten => johndoe@gmail.com,n,VoiceMail(201@voicemail)
exten => johndoe@gmail.com,n,Hangup()

;inbound from freephoneline 4164567890
exten => fpl,1,Dial(SIP/200&SIP/201,20) ; ring both extensions
exten => fpl,n,VoiceMail(201@voicemail)
exten => fpl,n,Hangup()

;check voicemail
exten => *98,1,VoiceMailMain(${CALLERID(num)}@voicemail)
exten => *98,n,Hangup()

exten => s,n,Hangup()

gtalk.conf
----------
[general]
context=local
bindaddr=0.0.0.0
allowguests=yes
externip=xxx.xxx.xxx.xxx ;your internet-facing ip

[guest]
disallow=all
allow=ulaw
context=local
connection=asterisk

jabber.conf
-----------
[general]
autoregister=yes

[asterisk]
type=client
serverhost=talk.google.com
username=johndoe@gmail.com/Talk ;; your gmail account
secret=password ;; your gmail password
port=5222
usetls=yes
usesasl=yes
statusmessage="I am available"
timeout=100

voicemail.conf
--------------
[general]
format=wav
attach=yes

[voicemail]
200 => 0000,John Doe,johndoe@gmail.com ;;PIN is set at 0000
201 => 0000,Jane Doe,janedoe@gmail.com

laurentius77
Posts: 82
Joined: Wed 30 Mar 2011, 07:02

Installed everything but no sounds

#17 Post by laurentius77 »

Followed your tutorial, compiled Iskemel and Asterisk 11. I can register my phones but there is a problem...there is no sound installed (neither for ringing or for voicemail).
Is there a command before make install in order to have the sounds installed?
There are 3 tarballs in asterisk-11.1.0/sounds before make install command but these are not installed.
So there is no ringing tone and no voicemail messages.
Thank anyone who can help.

Post Reply