OBiTALK Community

General Support => Installation and Set-Up (Devices) => Topic started by: wjcarpenter on November 21, 2015, 01:49:17 PM

Title: multiple SIP phones, how many SPs?
Post by: wjcarpenter on November 21, 2015, 01:49:17 PM
I'm just starting to try to figure this out, so I'm hoping the answer is obvious to anyone who has studied harder.  :)

I have a handfull of Cisco 7941/7961 phones and want to sprinkle them around my house to work with my Obi202. I plan to configure them with SIP firmware. This blog posting has an explanation of the configuration (which I haven't tried yet):

http://blog.obihai.com/2012/08/use-your-obi202-as-google-voice-gateway.html

I am already using SP1, SP2, and SP3. I have SP4 available, so it's obvious to me that I can configure at least one of those Cisco phones to work. What is unclear to me is if I can configure multiple of those Cisco phones on that single SP4 or if it has to match up as one extension with one SP.

Ideas?
Title: Re: multiple SIP phones, how many SPs?
Post by: drgeoff on November 21, 2015, 05:35:00 PM
My reading of http://www.obihai.com/docs/OBi-VoIP-Device-Attach-Legacy-IP-Phone-Workbook-v1-0.pdf is that the AuthUserName on the Obi202 SP slot and the IP phone must be the same.  That implies one IP phone per SP slot.
Title: Re: multiple SIP phones, how many SPs?
Post by: wjcarpenter on November 21, 2015, 05:52:32 PM
Thanks, I didn't know about that PDF document, which looks like an evolution of the blog post I linked to.

It also looks to me like it's 1-to-1, but maybe someone will know how to do it another way.

If I can't figure it out with just an OBi202, I'll probably later run Asterisk on a Raspberry Pi and slave all of the Cisco phones off of that. Another solution might be to pick up an OBi200 (in the sale coming up next week) and slave 3 Cisco phones off that.
Title: Re: multiple SIP phones, how many SPs?
Post by: azrobert on November 21, 2015, 07:57:09 PM
I just registered 2 devices to a single SP trunk on an OBi200. The first is the CSipsimple softphone on an Android and the second the Phonerlite softphone on Windows. It's been a long time since I played with this option, but I think I got 3 devices to register in the past. I never tried more. Each device uses the same credentials. You will need to increase the parm MaxSessions. To be safe I would use 2 sessions for each device.

Voice Services -> SP4 Service -> MaxSessions: 6

I never got "555555555.pnn.obihai.com:5063" to work. I use the IP address and port of my OBi200, as in the second option in drgeoff's link.

I never tried to use {SP2(1001@local_client)} as in your link, to route inbound calls. I just tried and it's flakey with multiple devices registered. It works with 1 device. When I registered the 2nd, only the 2nd device rang. I then closed the 2nd device and the 1st device wouldn't ring.

I route inbound calls to the IP address and port of the device like this:
sp4(1001@192.168.1.100:5060),sp4(1001@192.168.1.110:5070)

You can route an inbound call to a max of 4 devices using the above method. Some people had trouble routing calls like this to a Cisco phone. You can check the IP address and port of the registered device using OBi expert. Go to System -> System Status. Under SP4 Service Status the IP address and port of the LAST device registered will be displayed.

Edit:
You will probably need to increase MaxSessions on your service provider trunks. You will need 1 session for each simultaneous inbound and outbound call on the trunk.
Title: Re: multiple SIP phones, how many SPs?
Post by: wjcarpenter on November 22, 2015, 12:27:18 PM
Thanks for the suggestions. I'm starting to lean more and more toward doing the Cisco phones on a separate Asterisk installation, with the OBi202 acting as the trunk gateway and also handling the two local POTS lines.

Maybe I should say more about what I am trying to accomplish, and maybe there will be an easier way to do it.

This is my home phone set-up. I've got the OBi202 working fine with Google Voice (with incoming calls routed through Callcentric to pick up calling names from our contacts; and, the usual Anveo 911 service; so that's the three SP slots). We use a 2-line cordless phone, and the call routing on the OBi202 rolls over from line 1 to line 2 if line 1 is busy. We can make outbound calls on either line 1 or line 2. Life is good, and the OBiTALK portal makes it pretty darned easy to set all that up.

I've got a small pile of Cisco 740x and 760x phones. For some things, they are a better device than the cordless phone handsets. I'd like to set them up so that they seem to a naive user like additional POTS extensions. In other words, when POTS line 1 or 2 rings, I'd like the Cisco phones to also ring and be able to answer calls. And, I need to be able to make outbound calls from the Cisco phones.

Oh, most important, I need to be able to configure all that without the wife asking me why the phones are all screwed up. :-)
Title: Re: multiple SIP phones, how many SPs?
Post by: SteveInWA on November 22, 2015, 02:04:09 PM
Quote from: wjcarpenter on November 22, 2015, 12:27:18 PM
Maybe I should say more about what I am trying to accomplish, and maybe there will be an easier way to do it.

This is my home phone set-up. I've got the OBi202 working fine with Google Voice (with incoming calls routed through Callcentric to pick up calling names from our contacts; and, the usual Anveo 911 service; so that's the three SP slots). We use a 2-line cordless phone, and the call routing on the OBi202 rolls over from line 1 to line 2 if line 1 is busy. We can make outbound calls on either line 1 or line 2. Life is good, and the OBiTALK portal makes it pretty darned easy to set all that up.

"Life is good..."  Let me make a suggestion.  Stop at "Life is good...".  It's a nicely-implemented solution that meets your needs (and has the Spousal Approval Factor).

If you want to add more phones, then sell the Cisco phones on eBay or recycle them, and instead, buy OBi1022 or 1032 phones.  It is trivially easy to add more extensions to your Callcentric account for each additional phone, which will enable them to receive and answer calls as you wish.

Advantages of OBi IP phones over your Cisco "pile":

Title: Re: multiple SIP phones, how many SPs?
Post by: azrobert on November 22, 2015, 03:56:04 PM
The setup I suggested above will accomplish what you want. You can start with one IP phone for outbound only. This way you are not screwing with your configuration on the current 3 SP trunks. All the configuration changes are for SP4. You can even take a configuration backup before you start, so in the unlikely event that you somehow destroy your current config, you'll be able to restore it. Hopefully this will keep the wife happy.

Assumption: GV defined on SP1 and Callcentric on SP2

OBi202:
Service Providers -> ITSP Profile D  SIP -> ProxyServer: 127.0.0.1
Service Providers -> ITSP Profile D  SIP -> X_SpoofCallerID: Checked
Voice Services -> SP4 Service -> AuthUserName: OBi202
Voice Services -> SP4 Service -> AuthPassword: OBi202PW
Voice Services -> SP4 Service -> X_RegisterEnable: Unchecked
Voice Services -> SP4 Service -> X_ServProvProfile: D
Voice Services -> SP4 Service -> X_Proxy: Checked  
Voice Services -> SP4 Service -> X_InboundCallRoute: {OBi202>0:ph},{OBi202>(Msp1):sp1}
Voice Services -> SP4 Service -> MaxSessions: 6

IP Phone:
Proxy: 192.168.1.100  (IP address of the OBi202)
Proxy Port: 5063     (X_UserAgentPort of OBi202 SP4 trunk)
UserID: OBi202
Password: OBi202PW

Dial 0 to ring the OBi202 phone port 1
Any other dialed number that matches your ITSP A DigitMap will be routed to SP1

After you get outbound to work, you can define the inbound route. The following assumes your current SP2 X_InboundCallRoute is at the default "ph".

Voice Services -> SP2 Service -> X_InboundCallRoute:
ph,sp4(anything@192.168.1.110:5060)

Change 192.168.1.110:5060 to the IP address and port of your IP phone.
This will route inbound calls to OBi phone port1 and the IP phone.

You don't need any additional OBi202 changes to get outbound working for additional phones, just setup the phones exactly like the 1st. To get inbound routed to the additional phones, just add the IP address to the inbound route like this:
ph,sp4(anything@192.168.1.110:5060),sp4(anything@192.168.1.120:5060)

You can route inbound calls to a max of 4 devices.
Some people had trouble routing inbound calls to a Cisco phone using the above technique. If you do, check the IP address and port by looking at the System Status page as described in my last post.

To prevent problems with too many simultaneous outbound calls:
Voice Services -> SP1 Service -> MaxSessions: 5

I don't know the max number of simultaneous calls GV will support.

Edit:

Your IP phones will definitely work with Asterisk and it's a relatively easy setup.
Title: Re: multiple SIP phones, how many SPs?
Post by: azrobert on November 22, 2015, 05:19:46 PM
Quote from: wjcarpenter on November 22, 2015, 12:27:18 PM
I'm starting to lean more and more toward doing the Cisco phones on a separate Asterisk installation

This is how I setup Asterisk for routing calls to an OBi. I use FreePBX to configure Asterisk.

Asterisk

Setup an outbound trunk without registration for the OBi202:

Outbound CallerID: 4801234567

Peer Details:
type=peer
username=OBi202
host=192.168.1.110       (IP Addr and OBi202)
port=5063                        (Port of SP4)
canreinvite=no
insecure=invite,port
qualify=yes

Setup an outbound route for above trunk
Setup an inbound route for 900 (See OBi202 SP2 inbound route)
You can setup a Ring Group to ring multiple extensions

OBi202

Service Providers -> ITSP Profile D -> SIP -> ProxyServer: 127.0.0.1
Service Providers -> ITSP Profile D  SIP -> X_SpoofCallerID: Checked
Voice Services -> SP4 Service -> AuthUserName: OBi202
Voice Services -> SP4 Service -> X_RegisterEnable: (unchecked)
Voice Services -> SP4 Service -> X_ServProvProfile: D
Voice Services -> SP4 Service -> MaxSessions: 5

Route outbound calls from Asterisk to SP1
Voice Services -> SP4 Service -> X_InboundCallRoute: {4801234567>0:ph},{4801234567>(Msp1):sp1}
OR
Voice Services -> SP4 Service -> X_InboundCallRoute: {OBi202>0:ph},{OBi202>(Msp1):sp1}

Depending on the version, Asterisk will send either the outbound callerid or the username. I'm running Asterisk version 11.17.0 and it sends the outbound callerid.

Route inbound SP2 calls to Asterisk
Voice Services -> SP2 Service -> InboundCallRoute:
ph,sp4(900@192.168.1.100:5060)  (Asterisk IP address and port)

Title: Re: multiple SIP phones, how many SPs?
Post by: wjcarpenter on November 22, 2015, 05:28:59 PM
Quote from: azrobert on November 22, 2015, 05:19:46 PM
This is how I setup Asterisk for routing calls to an OBi. I use FreePBX to configure Asterisk.

Thanks! This looks like a great starting point that will save me a lot of head-scratching.
Title: Re: multiple SIP phones, how many SPs?
Post by: wjcarpenter on December 30, 2015, 05:35:37 PM
On the off chance that anybody is wondering, I settled on setting up Asterisk and linking it to the OBi. It was particularly trouble-free since I run OpenWRT on my routers, and some helpful person made packages for Asterisk 11 for OpenWRT.

Thanks again all who gave advice.