New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Asterisk PBX on Bubba II

A collection of tips on howto tweak your Bubba.
Post Reply
shocks
Posts: 18
Joined: 29 Apr 2008, 05:24

Asterisk PBX on Bubba II

Post by shocks »

This was originally posted in the "My Bubba" forum...

I went through a lot of pain before I could get it working. There is a Asterisk 1.4 version on the debian repo but I wanted to use a newer version. I found this blog post and followed it to the letter:

http://rutmandal.info/infotalk/2009/03/ ... debian-40/

Once you have compiled from source (it takes a while!) open asterisk.conf and edit the top line accordingly:

Code: Select all

[directories](!) ; remove the (!) to enable this 
If you want to run Asterisk as the user 'asterisk' then you'll have to follow these steps:

http://www.voip-info.org/wiki/view/Asterisk+non-root

After you've done that reboot Bubba. I had to do that for everything to work.

You should be able to do this now (as 'root' or 'asterisk' if you've changed permissions per the step above):

Code: Select all

bubba:/# asterisk -r
Asterisk 1.6.0.6, Copyright (C) 1999 - 2008 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.6.0.6 currently running on bubba (pid = 2529)
Verbosity is at least 9
bubba*CLI> 

You can add verbosity with:

Code: Select all

asterisk -rvvv
(or how may v's you want)

After you've got asterisk up and running you now have to update sip.conf and extensions.conf (according to your SIP providers instructions). If you're using Skype for SIP take a look at this post:

http://forum.skype.com/index.php?showtopic=487451

I modified my confs slightly.

This is what I added to the top of sip.conf:

Code: Select all

disallow=all
allow=ulaw
allow=alaw
allow=g729
register => 9905100000XXXX:LxXTF999QXXXX@sip.skype.com/9905100000XXX

externip = XX.XX.XX.XX

[100]
type=peer
host=dynamic
secret=100
context=users
mailbox=100@default

[SkypeForSIP]
type=friend
dtmfmode=rfc2833
host=sip.skype.com
username=9905100000XXXX
fromuser=9905100000XXXX
secret=LxXTF999QXXXX
canreinvite=no
allow=ulaw
allow=alaw
allow=g729
insecure=invite
fromdomain=sip.skype.com
context=users
This is what I added to the bottom of extensions.conf:

Code: Select all

[users]
include => local

[local]
exten => _0.,1,Dial(SIP/SkypeForSIP/+44${EXTEN:1})
exten => _00.,1,Dial(SIP/SkypeForSIP/+${EXTEN:2})

exten => 9905100000XXXX,1,Dial(SIP/100, 20)
exten => 9905100000XXXX,2,VoiceMail(100@mb_config)
exten => 9905100000XXXX,3,PlayBack(vm-goodbye)
exten => 9905100000XXXX,4,Hangup()

exten => *97,1,VoiceMailMain(100@mb_conf)
In the bottom of voicemail.conf:

Code: Select all

[mb_config]
100 => 100, 100, youremail@yourdomain.com
Theses configs could probably be done better, but they work for me. You'll have to edit extensions.conf according to your country code. For UK (where I am) I have +44 so you'd switch it with +46 for Sweden, for example. This is Skype for SIP specific. All calls must start with the country code +44 20 7.... It may not be the case with other SIP providers.

I'm using a Cisco IP phone and it works great. Also checkout 'Telephone' (code.google.com/p/telephone/) soft IP phone if you're on a Mac.

Hope this helps.

Ben
Post Reply