Using CSipSimple With OBi
ianobi:
This thread is only one way of using CSipSimple with OBi. Recent ideas have come up with a different direct calling method with simpler digit maps. See here:
http://www.obitalk.com/forum/index.php?topic=6211.msg39466#msg39466
Anyhow - there's still plenty of interest in this thread - so read on :)
This example uses CSipSimple on an Android smartphone, but similar setups may well be possible with other types of smartphones. CSipSimple is capable of using the native android phone dialler. The aim here is to dial seamlessly from you smartphone through your OBi using only the data connection on your smartphone. It should work exactly like OBiON, except CSipSimple has much better features!
One problem to overcome is that some SIP providers assume that any number starting with 0 should be routed by their servers to PSTN. I got over this by starting all numbers with **7. Also, you need a fixed ip for the OBi or a ddns type address. At the OBi end I used sp2 for incoming calls, my UserAgentPort is 5071.
1. Set up CSipSimple on your cell phone and add a SIP provider as an account (I used sip2sip). You may find it easier to use say an eight digit number as your username.
2. Using CSipSimple > Settings > YourSIPAccount > Filters, set two rules:
Prefix all numbers with **7.
Suffix all numbers with @my.ddns.com:5071
3. Set up the InboundCallRoute for the OBi, sp2. I’m using an OBi110, Primary Line PSTN:
Voice Services -> SP2 Service -> X_InboundCallRoute (SP2 must be configured for SIP):
{(Mcot)>(<**7**1:>(Msp1)),(Mcot)>(<**1:>(Msp1)):sp1},{(Mcot)>(<**7**2:>(Msp2)),(Mcot)>(<**2:>(Msp2)):sp2},{(Mcot)>(<**7**8:>(Mli)),(Mcot)>(<**8:>(Mli)):li},{(Mcot)>(<**7**9:>(Mpp)),(Mcot)>(<**9:>(Mpp)):pp},{(Mcot)>(<**7:>(**0)),(Mcot)>**0:aa},{(Mcot)>(<**7:>(***)),(Mcot)>***:aa2},{(Mcot)>(<**7:>(Mli)),(Mcot)>(Mli):li},{(Mcot)>(<**7:>(0)),(Mcot)>0:ph},{ph}
Mcot has to contain your sip2sip user name.
If you don't have a SIP provider and SP2 is unused, the following will enable SP2 for SIP:
Service Providers -> ITSP Profile B -> SIP -> ProxyServer : 127.0.0.1
Service Providers -> ITSP Profile B -> SIP -> X_SpoofCallerID : checked
Voice Services -> SP2 Service -> AuthUserName : (any userid - this is CallerID sent on outgoing calls)
Voice Services -> SP2 Service -> X_RegisterEnable : (unchecked)
Voice Services -> SP2 Service -> X_ServProvProfile : B
I’m sure that you can see the principle – CSipSimple adds **7 to the front of every call, OBi removes **7 from the front of every call and routes the call to where it needs to go. So dialling from your cell phone is the same as dialling from your OBi phone or OBiON.
I also have another sip2sip account set up on my Obi in the sp2 position, but I don’t think this is required or does anything for this set up. I use it for outgoing calls. It does not matter what provider is on sp2, but it must be set up for sip.
The CSipSimple filter rules only work if you choose “integrate with android” and then dial using the cell phone’s dial pad not CsipSimple’s. I guess you could avoid the filter thing if you want to punch in all the extra numbers and letters or store all the numbers in contacts as **7xxxxxxxxxx@my.ddns.com:5071 but the filter rules are there to make life easier!
Testing is best done using a wifi connection.
Everything so far has been about calls coming in from CSipSimple. To call from your OBi to the CSipSimple app set up a speed dial like so:
sp2(userid@sip2sip.info)
For calls coming into say GV on sp1 to ring the phone attached to OBi and your android phone via your sip2sip account on CSipSimple, you need this:
Voice Services -> SP1 Service -> X_InboundCallRoute:
{sp2(userid@sip2sip.info),ph}
Where userid is the sip2sip userid of the account registered with CSipSimple. This will “fork” the incoming call to the android phone and the OBi phone. First device to answer gets the call.
Lots of info there, but I can tell you it does work!
Unrelated: I upgraded to the latest CSipSimple a few days ago and could not make or receive any calls on my lg p500 android oxygen ICS. I downgraded back to 0.04-02r1900 and all works perfectly.
Edit: Recently upgraded to CSipSimple version 1.00.00r2225 and everything works fine.
dinlaca:
Trying to follow what you did, as it is very similar to what I am trying to do.
I have an android phone that I am trying to setup with my POTS and Google Voice through Obi. Ideally, the set-up would look something like this tree:
Google Voice (through sp1) ---> Obi110 (through PHONE port) ---> landline plugged into Obi110
(through sp2) ---> to Csipsimple on android phone
In an ideal world, I would be able to dial out of both landline and csipsimple (over data connection), and when someone dialed my Google Voice, it would ring at both landline and android phone.
I tried implementing your setup, and I got (1) sip2sip.info account set up and registered in csipsimple, with appropriate filter programmed (took me a while to find that filter required two steps, "All", then "Add Prefix/Add Suffix"), and (2) Google Voice working fully (call in and call out) on sp1 of my OBi110. I am having problems programming my user programmed dial plan (the cot in your example) and getting sp2 to work. Any more explicit details that you can provide after steps 1-2 above would be much appreciated.
Of course, this all assumes that this can be done when sp1 is Google Voice (and not POTS, as yours seems to be set-up).
Any help appreciated.
Thanks.
ianobi:
Dinlaca,
Welcome to the forum :)
The good news is that what you want can be achieved. The bad news is that it might take a few days given the problems of us probably being in different time zones and me not being as available as usual over the next few days. Be patient and we will get there. I’ll post enough here to keep you going for a couple of days ;)
From what you are saying then I’m guessing that your PrimaryLine is set as follows:
Physical Interfaces -> PHONE Port -> PrimaryLine : SP1 Service
In your case this is GV. If that is true, then you need to make a small change as follows:
Voice Services -> SP2 Service -> X_InboundCallRoute (SP2 must be configured for SIP):
{(Mcot)>(<**7**1:>(Msp1)),(Mcot)>(<**1:>(Msp1)):sp1},{(Mcot)>(<**7**2:>(Msp2)),(Mcot)>(<**2:>(Msp2)):sp2},{(Mcot)>(<**7**8:>(Mli)),(Mcot)>(<**8:>(Mli)):li},{(Mcot)>(<**7**9:>(Mpp)),(Mcot)>(<**9:>(Mpp)):pp},{(Mcot)>(<**7:>(**0)),(Mcot)>**0:aa},{(Mcot)>(<**7:>(***)),(Mcot)>***:aa2},{(Mcot)>(<**7:>(Msp1)),(Mcot)>(Msp1):sp1},{(Mcot)>(<**7:>(0)),(Mcot)>0:ph},{ph}
cot is a User Defined Digit Map:
(12345678|87654321|11223344)
My cot happens to have three Caller IDs in it. Using this method means you only have to change cot if you add or change Caller IDs, rather than change every reference of Mcot in the InboundCallRoute. cot has to contain your sip2sip user name.
Remember SP2 must be configured for SIP. If you don't have a SIP provider and SP2 is unused, the following will enable SP2 for SIP:
Service Providers -> ITSP Profile B -> SIP -> ProxyServer : 127.0.0.1
Service Providers -> ITSP Profile B -> SIP -> X_SpoofCallerID : checked
Voice Services -> SP2 Service -> AuthUserName : (any userid - this is CallerID sent on outgoing calls)
Voice Services -> SP2 Service -> X_RegisterEnable : (unchecked)
Voice Services -> SP2 Service -> X_ServProvProfile : B
Assuming that you are using default settings, then port 5061 will need to be forwarded to the OBi in the router, as this is the default UserAgentPort for sp2. I use 5071 to defeat sip scanners so I forward port 5071. This number must match the suffix in CSipSimple:
@my.ddns.com:5071 is what I have, if you are at default then you should use @my.ddns.com:5061.
It is useful to be familiar with Call History for seeing what is coming into and being sent out of your OBi. This can only be accessed via the web page Status > Call History. The web page IP address can be found by dialling ***1.
I use a softphone (PhonerLite) for testing DigitMaps etc. It is easy to set up accounts with same Caller IDs etc and simulate situations. For instance, in this case you can send in **7**112345678912@ my.ddns.com:5061 and see what happens and look in Call History to see if the call came in on sp2 and went out on sp1.
That’s enough to keep you going for a couple of days :) I’ll be back Thursday.
Credit goes to RonR for the original explanations, which all of this is based on.
azrobert:
Ianobi,
Thanks for this tip. I already had a similar setup using a 2nd ATA, so I was up very quickly.
I setup an account at SIP2SIP using the same username as my ATA and I didn't have to make any changes to my OBi110.
Do you know why the filter doesn't work with the CSipSimple keypad?
I don't like how the native dialer asks if you want to use CSipSimple or Mobile after you dial a number.
Update:
I see the disclaimer under Filters:
"To apply when integration to android is used"
I have an android tablet that doesn't have a dialer, so I can't use CSipSimple with it. Seems like a stupid restriction. Must be a reason.
ianobi:
Yes, it does seem odd that filters don't work with the CSipSimple keypad. However, using the android native keypad/dialler does mean that you can use all your phone contacts with no need to import to CSipSimple. The downside is an extra choice to make on which service to use - mobile or SIP account.
I still rate CSipSimple quite highly for being very configurable, good choice of codecs etc.
Navigation
[0] Message Index
[#] Next page