|
Last blog posts
Login |
Blog: VoIP, telephony
Description: Asterisk, Cell phone, land lines, and others... to build a truly hybrid phone system
Created by TaneliOtala on Fri 11 of Dec, 2009 [00:40 UTC]
Last modified Fri 11 of Dec, 2009 [03:11 UTC]
(3 posts | 1056 visits | Activity=6.00)
Doorbell 2.0
Having a large house (well, not by square foot, but by distance of my home office from the front door...) poses a problem with how to make a doorbell work.
So, I looked at various sellers of doorbells — any doorbell that works across 300 yards, will cost some money. Then, I have two doors that I'd like to have the doorbells at. Isn't this just begging a geeky solution? Since I already have the whole house wired with multiple gigabit backbone (bragging here) and an Asterisk/FreePBX phone system... isn't there a better solution? And, since I can find Sipura SPA-841 phones on eBay for $10 a piece... (I bought a dozen) So, all that was needed, was just to build some weather resistant enclosures for the phones, and program them so they only work in intercom mode. The magical ingredient, was to put in the EXT1/EXT2 dialplan of the phones: (S0:501@192.168.254.1:5060) Where 501 is the extension for whole-house bidirectional intercom, and 192.168.254.1 is the IP address (inside my network) for the asterisk. The rest is normal. Of course, the whole-house intercom on the asterisk, is just a simple "Paging and Intercom" configuration on FreePBX. It works beautifully with the Polycom and Sipura phones I have amassed from eBay. If a long-distance doorbell costs $90 (times two doors, and four ringers), and two measly SPA-841 phones cost just $10 a piece... what was the question? And now, if someone "rings the doorbell" I can get it to my cell phone... and I can press "1" to open the door lock... (see more on the home automation side)
Unlimited incoming trunks...
Incoming trunks, how many calls can you have?
(and, on a side-note, do you have teenage daughters?) Taking a basic Broadvoice trunk line, it allows two simultaneous calls, inbound, outbound or mix. I obviously need much more Enter ipkall and unlimited incoming calls... You get free numbers in Seattle, and you route them to your Asterisk via IAX2 (they used to only support SIP, but IAX2 is more compressed, less traffic, better security, etc). Throughout this example, I'm using 3601111111 as the number that you get assigned by IPKall, obviously you'll want to use the real number. As the password, I'm using "mypasswd" — again, please use your imagination. Go to the site, register a number.
Now, on your asterisk, create a Trunk:
Finally, in Inbound Routes, create a new one:
So there... You might want to punch up "asterisk -r" to verify the routing of the incoming call. If everything goes right, you should be receiving incoming calls as authenticated IAX2 calls, and you can route them as you choose. Final bits:
I have had conference calls of 12 callers successfully with this setup.
Howto: recognizing one of many phone numbers and routing
Broadvoice (and other VoIP) providers allow you to register multiple phone numbers...
All the phone numbers come through the same VoIP (SIP) registration. All you get is a "call indicator" or "distinctive ring pattern" or "short-short-long" to identify which number (DID) was actually called. How do you tell the incoming numbers apart in an Asterisk/FreePBX scenario? If you are using a plain asterisk, this is fairly easy to just build into the dialplan... but if you are using FreePBX (as I have switched to use, so I can spread some of the maintenance to other people), you have to actually know where to put it... My main phone number is 4087739689, that is the registered Broadvoice number. I have another number, 4089921711 which is for my consulting business. I also have another number, 5307250195, for use when family is vacationing at Lake Tahoe. Find in your asterisk/freepbx setup, the file /etc/asterisk/extensions_custom.conf Add the following: [from-pstn-custom] exten => 4087739689,n,GotoIf($["${SIP_HEADER(Alert-Info)}" = "http://127.0.0.1/Bellcore-dr3"]?from-pstn,4089921711,1) exten => 4087739689,n,GotoIf($["${SIP_HEADER(Alert-Info)}" = "http://127.0.0.1/Bellcore-dr4"]?from-pstn,5307250195,1) NOTE: the "http:...drX" needs to be inside less-than and greater-than brackets... it seems I can't get TikiWiki? to agree to that... Note, the "from-pstn-custom" is a pre-determined context, read in by /etc/asterisk/extensions.conf Note also, that I don't define the 4087739689 at all — I let it "fall through" without any handling. All I'm doing here, is picking the "Alert-Info" of "Bellcore-dr3" and "Bellcore-dr4" which are the distinctive ring patterns for the 2nd and 3rd number I have... putting the proper DID in place by means of "Goto" back (recursively) to "from-pstn" context... and letting asterisk/freepbx do the rest of the work. One thing needed... now you need to add a few inbound routes. You probably already had the inbound route for "4087739689" — but now you also need inbound routes for "4089921711" and "5307250195" to route them as you please. In my scenario, I just route those pseudo-DIDs now to different IVRs and/or direct extensions.
Page: 1/1
1 |