Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to set up a "asterisk" phone system with an Obi ATA
#11
sic0048 Wrote:Darn it, you made me buy it! ;-)

My wife tells me I'm really good at helping other folks part with their hard earned cash. :roll: Hope your not disappointed...

-Ben
Reply
#12
daddyd Wrote:Feel like this was left as a season ending cliff hanger....I've got my pi (set up with Asterisk) and my Obi202, they just dont get along yet. I think it is all pretty cool and it is sweet that I can drop my "normal" $60/mth landline for a couple of bucks a month but think I may need some more technical help. No rush though, I will just keep hitting refresh on this screen until I see the next steps.

Have you selected a VoIP provider? I see you are in Canada, take a look at voip.ms (that's their URL)

There are multiple parts to setting Asterisk up.

  1. You have Asterisk installed, it's essentially the hub.
  2. The voip provider(s) are a spoke or spokes if you have multiples, they are connected via trunk definition(s). Definition is required both in Asterisk and on the voip provider side.
  3. You have the obi202 which will be serving as your digital to analog interface, that is another spoke on the hub. Each of the two phone lines are set up as individual SIP phones which in Asterisk is an extension
  4. You have phone extensions with attributes (like voice mail, etc)
  5. If you set up SIP phones, whether physical (like the Grandtech) or software based those are treated as additional spokes and are set up as SIP extensions
I'm not in a spot where I can provide more how to tutorial like detail and some pics of my setup, I'll try to get to it tomorrow. (doing this from memory and not in original order)

To break it down, I did this: (with lots of googling and many hours, Nerd Vittles blog has lots of good info, they just posted a new quick start tutorial today)
  1. Installed Asterisk on my Pi
  2. configured a trunk which maps Asterisk and the voip provider to talk to each other
  3. configured 1 extension (default port 5060) I used the demo extension
  4. configured an inbound route in Asterisk (connectivity / inbound route) that mapped to the extension (this is what happens when the phone # is dialed)
  5. configured an outbound route which has a basic dial plan and maps to the voip provider (this is what happens when you pick this extension up and dial a number)
  6. configured obi202 line 1 to talk to the extension on default port 5060 on the asterisk server (there are 3 parts in the obi202 configuration that have to be mapped for this to work)

Where are you stuck, what is your FreePBX System Status telling you? (Reports / FreePBX System Status in the web gui or the first screen that comes up when you log in to you Asterisk server)

Hope this helps some...

-Ben
Reply
#13
Thanks for the feedback.

I do have a local voip.ms # and also a GVoice#. I currently have my voip.ms # routed to my obi 202 to ring my analogue phones and that is working real well. I have been trying to get my GVoice# routed through the pi. I loaded the Incredible PBX image (3.7) on it and followed the directions on the nerd vittles site. It seems to be operational for incoming calls as I can route them either through the VM or IVR. I still am not able to make an outgoing call through it (using a soft phone) or am I able to feed that line through the obi202. This is where I am stuck.

Thanks again for the help.

Update: I can now make out going calls. Just need to figure out how to route it into the obi202.
Reply
#14
Okay, so now the detailed fun starts... (like it wasn't before, eh?)

Anyone have luck telling the Obi to pass through * commands to Asterisk, oh, like voicemail?

I haven't figured out whether I need to modify the Digitmap or Outbound call route on the Physical Phone interface. I think it is the Digitmap, and then how to do it? The Obi Admin doc is very cryptic at best

Be careful, there are a few that overlap between the Obi and Asterisk, you dial the * code thinking your routing through to Asterisk and instead you are triggering a * command on the Obi...

Once this is figured out then I can also pass through the * command that I want to use to control which outbound route gets used, e.g. Google voice vs the voip provider, etc. I thought I would start with the voice mail since that one is a functional requirement I need to have working for our household.

-Ben
Reply
#15
Is there a detailed list of items to purchase for the Raspberry Pi part of this?

And a good vendor?
Reply
#16
jkish Wrote:Is there a detailed list of items to purchase for the Raspberry Pi part of this?

And a good vendor?

All you really need is the device and a power supply. Obviously a case would make it nicer, but it depends on where you are going to put it.

I bought mine from Newark.com although you can also get them from MCM Electronics. As far as power supply, if you have to purchase one, this model has been tested and proven to work well even when overclocking. But if you have a spare 5v charger from a phone or tablet, you might just try that and see how it does. The device seems to be sensitive to power issues, so if the charger cannot provide enough voltage and amps, the device may experience some weirdness. It shouldn't damage the device (as long as the power being supplied is within specs), but you may have to go with a tested charger like the one I linked to.
Brian

"Really dear, it was too good of a deal to pass up. Besides, look at what it does now...."
I think my wife is getting a little tired of hearing this :-)
Reply
#17
sic0048 Wrote:All you really need is the device and a power supply. Obviously a case would make it nicer, but it depends on where you are going to put it.

I bought mine from Newark.com although you can also get them from MCM Electronics. As far as power supply, if you have to purchase one, this model has been tested and proven to work well even when overclocking. But if you have a spare 5v charger from a phone or tablet, you might just try that and see how it does. The device seems to be sensitive to power issues, so if the charger cannot provide enough voltage and amps, the device may experience some weirdness. It should damage the device (as long as the power being supplied is within specs), but you may have to go with a tested charger like the one I linked to.

I got mine from MCM, in kit form as that was all they had at the time which was the board, power supply, 4gb card and a case. You will need at least 8gb for the memory for Asterisk (it crabbed at me about being nearly out of space with the 4gb), I just went with a 32gb card. The Asterisk image is only 4gb but you can resize it on the fly after the initial installation.

-Ben
Reply
#18
Problem: Power goes out, how do I cleanly shutdown my Asterisk sytem running on a RaspberryPi so that there is not the risk of file corruption from a hard shutdown?

Solution: In this tutorial I will take you through how to set up the pieces necessary to shut down your RaspberryPi remotely running a batch file from a Windows workstation triggered by UPS software running on said Windows box.

Updated Solution: direct UPS monitoring by USB or serial see here.

Basic steps:

1) create user account to be used for shutdown
2) grant the correct privileges for the user account
3) download putty software. Utility necessary to run a remote UNIX command
4) create a batch file to shutdown your RaspberryPi
5) test the shutdown command from a windows dos prompt (by triggering a reboot instead of a system halt)

as root from the linux command line (lines with the # )

Create the user

# adduser shutpidown

Add shutpidown to the sudo group

# adduser shutpidown sudo

Set the password for shutpidown

# passwd shutpidown

You will be promppted to enter a password and then to confirm. <password> tag used in later instructions = the password entered for the account here

Contain user account shutpidown so that it can only run shutdown by using visudo utility

# cd /etc

# visudo

Find the lines of text that look like this

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
%users ALL=(ALL) ALL
asterisk ALL = NOPASSWD: /usr/local/bin/gvoice

and add

shutpidown ALL = NOPASSWD: /sbin/shutdown

so that the block now looks like this:

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
%users ALL=(ALL) ALL
asterisk ALL = NOPASSWD: /usr/local/bin/gvoice
shutpidown ALL = NOPASSWD: /sbin/shutdown

Exit visudo with ^X
answer Y to prompt

You will need putty to run this remotely from windows so from this site and download the Putty library from here (direct file link)

Unzip the putty.zip

create a batch file called shutpidown.bat

In the batch file add the line (with a carriage return at the end) where nnn = the last 2 octets of the IP address of your RaspberryPi and <password> = password you set for the account in the step above

plink -T shutpidown@192.168.nnn.nnn -pw <password> sudo /sbin/shutdown -h -P now

Save the file. Note, you will have to have plink in the same subdirectory where you execute the batch file or provide an explicipt path e.g. c:\utils\putty\plink

For testing purposes you can also run plink directly from the command line by substituting a -r (reboot) for the -P (halt action to turn power off) so that you just trigger a reboot instead of a shutdown which will force you to power off the Pi and power back up to restart the system

plink -T shutpidown@192.168.nnn.nnn -pw <password> sudo /sbin/shutdown -h -r now

Next you will have to set up your UPS software on your windows machine to trigger the batch file when it goes on battery. I'm not going to specifically detail this given the potential variability in UPS software configs

Now, when the the UPS goes on battery you can gracefully shutdown your Pi and not have to worry about data file corruption. In particular I have read that you run the risk of corrupting the mySQL (I think that is what is used) database Asterisk depends on if you don't shut it down properly.

Hopefully I captured everything I did to get this to work Confusedhock:

Happy remoting...

-Ben
Reply
#19
Problem: How do I get to voicemail on my Asterisk system with the telephones connected to the Obi202 box.

This tutorial assumes that you Line 1 and Line 2 on your Obi202 mapped to 2 extensions on your asterisk box as I do... Note, for high WAF I set my voice mail prompt to match my old vonage service voicemail which is *123 (see below how to change this setting)

1) Go to the web admin console on your Obi202
2) On the left find Service Providers & expand
3) Expand ITSP Profile A and click on General
4) For the parameter line named "DigitMap" uncheck the default box on the right this will allow you to edit the Value
5) Add *123| to the front of the list so that it now looks like this: (*123|1xxxxxxxxxx|<1> ... <the rest of the line is edited out>
6) repeat steps 1-5 for Profile B if you have it configured
7) Submit the change and then reboot the Obi202

To change the voice mail prompt (recommended since it conflicts with one of the * commands on the Obi202 box) do the following:

1) Log into your Asterisk server
2) Select Admin / Feature Codes
3) Locate My Voicemail at the bottom and uncheck Use Default
4) Change the * code to *123
5) Click on Submit Changes Button (at the bottom)
6) Click on Apply Config (at the top)

Pay attention to what * code you choose for My Voicemail (or any other feature code you decide to change) and make sure that you don't conflict with an existing code on either Asterisk or your Obi202. The Feature codes for the Obi202 are posted on the Obi202 web site here.

Now you can dial your voice mailbox on your Asterisk server from a phone connected to the Obi202 box.

-Ben
Reply
#20
I wanted to be able to access my Pi from my windows development machine so...

To turn on Samba on PIAF: (from Nerdvittles site)

Activating SAMBA for Windows Networking. SAMBA is included for transparent access using the Windows Networking Protocol from PCs, Macs, and other Linux machines. As delivered,

SAMBA is deactivated. For obvious reasons, we recommend you never activate root login access to SAMBA without a very secure password. If you wish to enable SAMBA on your

server, here are the steps while logged in as root:

1. Set SAMBA password for user root:

# smbpasswd -a root

2. Change Windows workgroup from WORKGROUP, if needed: (its in the config file your going to edit)

# nano -w /etc/samba/smb.conf

3. Manually start SAMBA from command prompt:

# service samba start

4. If desired, set SAMBA to start on boot: rcconf and activate SAMBA option space bar toggles, enter saves and exits

# rcconf

Note: I downloaded vim (vi replacement) and use that instead of nano because I used to use vi in a prior life...

To do this: (from the Asterisk Pi Forum) from the linux command line

# apt-get update (this updates your mirrors not the system)

Then

# apt-get install vim


How can I connect to a Samba share with authentication using Windows 7?

windows-7 samba

1) From the windows menu search box run secpol.msc

2) Find: Security Settings -> Local Policies ->Security Options

When you're there change the following policies

3) Microsoft network client: Send unencrypted password to third-party SMB server: Switch it to "Enabled".

4) Network security: LAN Manager authentication level: Select the option: Send LM & NTLM - use NTLMv2 session security if negotiated.

-Ben
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Setting up a HW RAID system IVB 10 8,977 03-27-2009, 06:02 AM
Last Post: klindy

Forum Jump:


Users browsing this thread: 1 Guest(s)