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#msg39466Anyhow - 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.