Author Topic: Sipura 3000 setup for pstn analog lline (NOW WORKING! TESTERS NEEDED!)  (Read 52557 times)

golgoj4

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1193
  • hrumpf!
    • View Profile
    • Mah Website
Re: Sipura 3000 setup for pstn analog lline - anyone else want to join in?
« Reply #15 on: January 13, 2009, 08:41:29 pm »
- then I do everything that is not possible in web-admin (Advanced-Configuration-Phones Setup) on "normal" Freepbx interface. But beware, changes in there will not be synced to LMCE database - so don't add phones there if you don't know why are you doing it...

Bulek,

what kind of things can't be done in the LinuxMCE interface? And would you mind to maybe add those things to the web admin interface of LinuxMCE? ;)

rgds
Oliver
hmm, a lot of things... You cannot do inbound, outbound routes, trunks etc... Basically you can only add phones, some predetermined VOIP providers and of course quite nice routing settings via web-admin...
I think it would be really complex task to duplicate FreePBX under web-admin and probably pointless too, cause majority of users should have enough existing web-admin interface...

What we would really need right now in this area is to update Asterisk and FreePBX to more current versions for 8.10, but that's a complex task cause current setup has some hacks in it.... and only some experienced Asterisk guru can do this....

Regards,

Bulek.
 

I agree that more can be done in freepbx, but I think that adding pstn setup option would be a start. I agree duplicating freepbx would be silly but thats a bit above my paygrade as im still working it out myself.

From what I understand, there are setup scripts that run when you configure a voip provider as well as extensions.
so wouldn't we do the same with the pstn? i suppose its a matter of hashing out a standard setup file for a pstn line based on location. And compatible devices that can accept the settings and act as the trunk.

just thinkin ...

golgoj4
Linuxmce - Where everyone is never wrong, but we are always behind xbmc in the media / ui department.

maybeoneday

  • Guru
  • ****
  • Posts: 194
    • View Profile
Re: Sipura 3000 setup for pstn analog lline - anyone else want to join in?
« Reply #16 on: January 13, 2009, 08:50:28 pm »
hi all,
@ golgo/jondecker ,
thanks for taking the time ,and the advice, considering that, and that I've found the lynksys at £50 ish,convinces me...spa3102 about to be ordered,,

many thanks,
Ian

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Re: Sipura 3000 setup for pstn analog lline - anyone else want to join in?
« Reply #17 on: January 13, 2009, 11:21:27 pm »
The first step is just education. The free downloadable O'Reiley book available on the Asterisk website ("Asterisk: The future of telephony") is a great start (600 pages of good information). I'm a couple hundred pages in so far and a lot more is making sense now. I highly suggest anyone that wants to help get this going read the book. There is detailed information on Dial plans and AIG (the protocol to interface to Asterisk from external programs). If we can understand thes relatively simple concepts, and do a little research on the current telecom_plugin, it actually shouldn't be har or take an expert to get things fixed and implemented. I'll try to spin off a post in the dev area to see who is interested in helping.

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Sipura 3000 setup for pstn analog lline - anyone else want to join in?
« Reply #18 on: January 13, 2009, 11:55:47 pm »
hmm, a lot of things... You cannot do inbound, outbound routes, trunks etc... Basically you can only add phones, some predetermined VOIP providers and of course quite nice routing settings via web-admin...
I think it would be really complex task to duplicate FreePBX under web-admin and probably pointless too, cause majority of users should have enough existing web-admin interface...

Is there anything in the capabilities that is currently only provided thru FreePBX that you think you could add to Web Admin. So that maybe 10% more of the tasks needed could be accomplished within the lmce environment.

rgds
Oliver

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Re: Sipura 3000 setup for pstn analog lline - anyone else want to join in?
« Reply #19 on: January 14, 2009, 12:43:34 pm »
I'm making some really good progress with this so far. I now understand Asterisk and the codebase enough that once I figure out the best settings for the SPA3000 (both on the local device, and in FreePBX), I can get automated setup to work.

The "Phone Lines" section of the web admin is responsible for setting up a Trunk, Incoming Routes and Outgoing Routes in FreePBX.  My plan at this point is to add a "SIP Device" for generic interfaces such as the SPA3000, and "Zap Device" option (if I can get an analog card) to the dropdowns to have automatically LMCE automatically configure. (At first sight, the SPA3000 appeared to be a Zap (analog) interface, but in reality it is a gateway and presents the phone line and the pstn as SIP devices to Asterisk). This is why we need to add configurations for both generic SIP and generic ZAP devices.
The voxilla website also has an automatic configurator for the SPA3000 which can automatically upload the settings to the device - which shows promise that setting up a device template and using a pnp configuration script, it may be possible to automate the entire process of configuring the SPA3000 settings. All very good news so far.

Also, I was very surprised at how well-coded and complex the custom-linuxmce dialplan is. Once again, it shows that the Pluto guys really knew what they were doing - even when things look jacked up at first glance.

What I could use right now to help get this moving:
-golgo already posted his method of getting the SPA3000 to work (though it would be nice to see how the Incoming Routes and Outgoing Routes are set up). Bulek or anyone else, can you post details on your SPA3000 configuration, as well as how things are set up in FreePBX for Trunk, Incoming Routes, and Outgoing Routes? The more examples we have, and the more examples I can test out, the better decision I can make on how to have LMCE set things up

-I do not have a true ZAP interface (analog PSTN card). If anyone has one they could put out on loan, I'd gladly try to add support for these devices as well (I'll buy one if I must, but thats not something I could do any time soon)
« Last Edit: January 14, 2009, 05:43:43 pm by jondecker76 »

golgoj4

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1193
  • hrumpf!
    • View Profile
    • Mah Website
Re: Sipura 3000 setup for pstn analog lline - anyone else want to join in?
« Reply #20 on: January 14, 2009, 04:34:38 pm »
Im going to start reading the o'reily book as well

my spa-3102 isnt setup fully. I forgot I nuked my lmce setup and only set it up as a voip extension on reinstall as nobody actually calls me on my pstn line. It will be done later tonight so I can post my results.
Linuxmce - Where everyone is never wrong, but we are always behind xbmc in the media / ui department.

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Re: Sipura 3000 setup for pstn analog lline - anyone else want to join in?
« Reply #21 on: January 14, 2009, 05:49:15 pm »
The O'Reiley book was excellent - i finished it this morning. A lot to digest, but gives absolutely needed information on the workings of Asterisk (dialplans specifically) and gives you a really good breakdown of kinds of things you can do with Asterisk. I'm going to see if there is a printed version of the book, as it is a perfect desktop reference.


bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Re: Sipura 3000 setup for pstn analog lline - anyone else want to join in?
« Reply #22 on: January 14, 2009, 09:18:21 pm »
Hi,

I'll post some details about my setup (I guess it's quite similar to yours - I only have GSM gateway on FXO interface - you will have your phone line). I have incoming calls from GSM gateway going to user housephone - this is dummy LMCE user (won't show on floorplan), but it's purpose is to have only one "user" receiving all incoming calls - so I can go in web-admin and set all call routing features only for that user (I came to this solution for me, cause we're 4 in my family, but we all use 2-3 common phones, so making routes for each user is too complex for our situation)...

Basically you have to imagine sipura in your case as two devices :
1. from FXO port (your line) to VOIP - Asterisk gateway -this is basically representing SIP extension to Asterisk (240) - "PSTN" line in Sipura web interface (I have also under Dial plan #8 line : (<S0:401>) - that means that on incoming call, extension 401 will be called)
2. from FXS (you can attach phone or doorphone in my case) to VOIP Asterisk gateway (another sip extension - 209 in my case) - "Line 1" in Sipura web interface

You must setup those two (I think that Voxilla configurator will setup this for you already)...

Now on Asterisk (LMCE) side :

1. I have SIP trunk defined for sipura device :
    put setting data for 240 "PSTN line" in Peer details. This trunk will be used for your outgoing routes (so call will go to your phone line)

2. extension 401 is custom extension defined only (no real device) and I have this line in there :
This device uses custom technology.
dial    Local/306@ext-local

That means that whenever I receive GSM call from Gateway (this is equal to your phone call), call will be forwarded to extension 306.  Extensions 3XX are not visible anywhere in FreePBX, but are created in Asterisk config files for each LMCE user. So extension 306 is extension for my previously mentioned user housephone (where all incoming calls go to).
What happens with calls on that extension, is determined by call routing setup you can do on web-admin - there you can specify behaviour regarding house security mode, Caller id, etc....

Comment: maybe calling 306 in first place instead of 401 in dialplan of Sipura first will also work, but haven't tried it...

3. outbound routes setup in Freepbx:
this where you determine how and where your outgoing calls with go. You can easily use your defined trunk as part of outbound routes...


Beware: this setup is done more in Freepbx than via web-admin, phone lines ,etc... works for me, cause I used Asterisk before and I want to setup few extra things in Freepbx (like more trunks in certain order for outgoing calls etc...), so maybe similar result can be achieved via web-admin in more proper way...

HTH,

regards,

Bulek.
Thanks in advance,

regards,

Bulek.

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Re: Sipura 3000 setup for pstn analog lline - anyone else want to join in?
« Reply #23 on: January 15, 2009, 02:34:08 am »
SUCCESS! I have my spa3000 configured PROPERLY in LinuxMCE (properly meaning that it follows all the standards of other LMCE phone lines, and interacts with LMCE as it should)! I started with a blank slate, compared several of the automated setup phone lines, traced a bunch of code, applied what I learned from reading the Asterisk book, and what others have posted here. Thanks a lot for all of the useful information!

What works:
Just about everything!  When a pstn call comes in, all of the orbiters in the house come on to the incoming call screen. If unanswered, LMCE voicemail takes over. CallerID comes in onto the orbiter screens just fine. Changing settings in the web admin works as it should. I can place outgoing calls just fine.

What doesn't:
-Dialing internal LMCE extensions... I haven't tried this much, when I get time I'll have to look through this a bit more.
-Dialing out works just like an ordinary phone ( you dont' have to dial a 9 first). This is incorrect and I need to fix this. It is also probably the reason dialing internal extensions didn't work when I tried.

Just wanted to give a quick report - its getting there! I would imagine being finished within a week or so.(to include full auto-config hopefully!)


« Last Edit: January 15, 2009, 03:34:57 am by jondecker76 »

freymann

  • Douchebag
  • Guru
  • *
  • Posts: 380
    • View Profile
Re: Sipura 3000 setup for pstn analog lline - anyone else want to join in?
« Reply #24 on: January 15, 2009, 04:25:53 am »
What works:
Just about everything!  When a pstn call comes in, all of the orbiters in the house come on to the incoming call screen. If unanswered, LMCE voicemail takes over. CallerID comes in onto the orbiter screens just fine. Changing settings in the web admin works as it should. I can place outgoing calls just fine.

 Wow! Jon you are one amazing dude!

 Is this the toy you're using?

http://cgi.ebay.ca/NEW-Linksys-SPA3000-VoIP-adapter-1-FXO-SPA3102-HT-488_W0QQitemZ370124599022QQcmdZViewItemQQptZCOMP_Telecom_IP_Telephony?hash=item370124599022&_trksid=p3286.c0.m14&_trkparms=72%3A1215|66%3A2|65%3A12|39%3A1|240%3A1318

 I may just go ahead and get one for playing with here!

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
yes, thats the right one (you can also look for the older Sipura models from before Linksys bought them out - they may be even cheaper)


Also, I figured out why dialing internal extensions didn't work and why I didn't need to dial a 9 for outgoing calls.. I haven't set the FXS port up in the spa3000 yet - so essentially my outbound calls are using the internal routing of the unit, and bypassing Asterisk all together. No big deal, I will set up the FXS (internal phone line) port tonight, add a new Phone device template and assign it an extension -  and all should work 100% exactly like the voip phones, with full LMCE integration.


I'lll be posting back here hopefully within the week with exact instructions on how to set this up so others can enjoy this while I work on the automated setup end of things.

freymann

  • Douchebag
  • Guru
  • *
  • Posts: 380
    • View Profile
yes, thats the right one

Kewl. Just ordered one!

This unit can be put anywhere on the internet network I take it? closest network port and phone jack?
« Last Edit: January 15, 2009, 05:06:37 pm by freymann »

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Yes, the ehternet port of the spa3000 just connects to your internal network.
There is also 2 phone jacks - one for the phone line (pstn), and the other for a telephone. How I am using mine is brining my pstn line straight to the device on the FXO port, then hooking up the main house phone line (which all house phones are connected to) to the FXS port. This treats the entire house's "land line" into one extension. So then I can transfer calls to a voip phone (on its extension), to a media director (on its own extension), or to the normal house phones (which has its own extension)

Of course, if you wanted to add more FXS ports, each analog phone in the house could have its own extension, but I think that treating the entire existing analog house phone system as one extension makes more sense. If for some reason you want any rooms to have their own phone and extension, this can be done with simple cheap SIP phones, while keeping the landline as its own extension.

golgoj4

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1193
  • hrumpf!
    • View Profile
    • Mah Website
jeebus dude im only barely into the book!  But seriously, awesome that your up and running so far. It seems i misunderstood you in that the spa-3000 is just an older spa-3102. I didnt realize it had and fxs and fxo port on it. Anyways, im very interested in your results as I have had little luck with dial plans, allthough im attempting to split between voip and pstn but still, awesome work!
Linuxmce - Where everyone is never wrong, but we are always behind xbmc in the media / ui department.

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
AFAIK, the 3102 and 3000 are identical, with the exception that the 3102 adds router functionality (DHCP server). So anything I get working on the 3000 should work on the 3102!