For years now, I’ve been using Asterisk for our home phone line (as well as one for our rental property business). One persistent issue has been getting SIP phones to act like regular non-PBX extension phones. You know — where two people in different parts of the house can use two phones on the same call.
Asterisk has shared line appearance (SLA) features, but this is designed to make it work like an old key system PBX. Not really the way we want it to work. If John is on a phone call and Jane picks up another extension, Jane can’t join the call — she just gets a new outbound line. Most of this is by design. For one thing, in most non-home settings you really don’t want just anyone to be able to join your call. If you want to add someone, you use the conference feature to dial their phone and add them. In a home setup, though, it’s a hassle and it’s complicated — since you don’t necessarily know which extension a person is using, especially if you’re using cordless phones. Asterisk is really not developed for home use; for some pretty obvious reasons, it’s mostly used by businesses. It is, after all, a PBX.
The solution I’ve used thus far is a regular analog cordless phone system (Panasonic, Vtech, etc.) and an ATA adapter like the Grandstream HT801. That device connects your analog phones to Asterisk. This approach is good, but it’s not a perfect solution. You can’t do things like use your cordless phones to make more than one simultaneous call (unless you have a multiline cordless phone and an HT802). These are also typically consumer grade phones, with limited displays and battery life. The quality of cordless phone systems has most definitely not improved over the past few years.
I want to try out some of the new Wifi SIP phones for a number of reasons, but I want to do it without losing the basic advantages of the consumer type cordless phones. What I finally came up with is a decent solution that combines the best of both worlds. Now if John is on a call and Jane picks up the phone, she can place a new call without interrupting John. She can also, however, join John’s call if she wants.
In my Asterisk dial plan, I added a new extension to my internal context. Dialing *11 will join your call to an existing call if one is in progress. I do this with the BridgeAdd()
application and the CHANNELS()
function, like this:
exten = _*11,1,NoOp(Join call)
same = n,If(${CHANNELS(trunk)})
same = n,BridgeAdd(${CHANNELS(trunk)})
same = n,EndIf()
same = n,Hangup()
CHANNELS(trunk)
works because any channel that is created for an external call has that pattern in the channel ID. In my pjsip.conf file, I have my trunk connections configured with that string in the name – so it’s an easy target for the regex parameter passed to CHANNELS()
.
I’ve got a Wifi SIP phone on the way that has some programmable softkeys. I suspect I’ll find a good use for one of those to make operating them as simple as a Panasonic DECT phone.