OBiTALK Community

General Support => Installation and Set-Up (Devices) => Topic started by: ianobi on November 25, 2012, 03:26:42 AM

Title: Using CSipSimple With OBi
Post by: ianobi on November 25, 2012, 03:26:42 AM
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.
Title: Re: Using CSipSimple With OBi
Post by: dinlaca on November 26, 2012, 08:10:28 PM
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.
Title: Re: Using CSipSimple With OBi
Post by: ianobi on November 27, 2012, 08:02:53 AM
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.

Title: Re: Using CSipSimple With OBi
Post by: azrobert on November 27, 2012, 10:23:02 PM
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.
Title: Re: Using CSipSimple With OBi
Post by: ianobi on November 28, 2012, 08:04:04 AM
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.
Title: Re: Using CSipSimple With OBi
Post by: dinlaca on November 28, 2012, 01:27:03 PM
Thank you for your further explanation.

In following your instructions, I am facing a few setbacks.

Setback 1:  Getting my OBi110 to register with sip2sip.info account. 

*********
SOLVED - I followed the settings at the following:  http://www.obitalk.com/forum/index.php?topic=1366.0  I have to remember that search is my FRIEND.  I am keeping below to assist other who may run into analogous problems.
*********

Under System Status --> SP2 Service Status, I am getting the following message:
"Register Failed: 403 This domain is not served here (server=85.17.186.7:5060; retry in 27s)"
The domain 85.17.186.7 resolves to proxy.sipthor.net, from what I can tell.

My related setting changes (I omit the auto changes made in provisioning my Google Voice account) that are different from Default are as follows:

Under ITSP Profile B --> SIP, I have the following:
ProxyServer           proxy.sipthor.net      
ProxyServerPort          (Default - 5060)   
ProxyServerTransport   (Default - UDP)      
RegistrarServer           sip2sip.info
RegistrarServerPort   (Default - 5060)      
UserAgentDomain   sip2sip.info      
OutboundProxy      proxy.sipthor.net   
OutboundProxyPort   (Default - 5060)      
RegistrationPeriod   600

When I tried changing the ProxyServer value to sip2sip.info, I received a similar "Register Failed" error on the System Status --> SP2 Service Status page, but error referenced (server=81.23.228.129)

Under Voice Services --> SP2 Service, the only changes I made from Default are:   

Under submenu "SP2 Service":
      
X_ServProvProfile   B      

X_InboundCallRoute      A "cut and paste" from your DigiMap post above

(Question - Should X_RegisterEnable be checked or unchecked when I am using a real SIP provider (i.e., sip2sip.info)?)

Under submenu "SIP Credentials":

My AuthUserName and AuthPassword are as set up for my sip2sip.info account.

Under User Settings --> User Defined Digit Maps, the only change I made was define a new Digit Map, called "cot" as follows:

(xxxxxxxxxx@sip2sip.info|xxxxxxxxxx) where xxxxxxxxxx is a 10-digit number that is part of the username on my sip2sip.info account.

Setback 2:  Getting my softphone to communicate with my OBi110 box.

This may be related to setback 1 (and probably is), but when I do a call in the format **7(10-digit-number-with-area-code-and-no-leading-1)@(IP-Address-For-My-Router), I get an Address Not Found error or a timeout error.

Anyways, I think that I need to get my OBi to register with my SP2 service (sip2sip.info) before I can move forward.  So, any help that you can provide to me in that regard would be much appreciated.

Please let me know if posting screen shots would be helpful to you in assisting me.

Apologies from a novice.  And, many thanks in advance.
Title: Re: Using CSipSimple With OBi
Post by: QBZappy on November 28, 2012, 01:46:53 PM
dinlaca,

Grandstream PBX (Working config)
SIP Server URL    sip2sip.info
Outbound Proxy URL    proxy.sipthor.net
Account Name    2231112222@sip2sip.info
Account ID    2231112222
Authenticate ID 2231112222


dinlaca (Non-working config)
Under ITSP Profile B --> SIP, I have the following:
ProxyServer           proxy.sipthor.net      <--------- You may not need this one
ProxyServerPort          (Default - 5060)   
ProxyServerTransport   (Default - UDP)     
RegistrarServer           sip2sip.info
RegistrarServerPort   (Default - 5060)     
UserAgentDomain   sip2sip.info      <--------- I don't need this one
OutboundProxy      proxy.sipthor.net   
OutboundProxyPort   (Default - 5060)     
RegistrationPeriod   600

You didn't show your log in creditials. Error 403 is a credentials issue I think. Enter them in the form I mentioned above.

See if you can register with this.
Title: Re: Using CSipSimple With OBi
Post by: dinlaca on November 28, 2012, 02:43:05 PM
Quote from: QBZappy on November 28, 2012, 01:46:53 PM
dinlaca (Non-working config)
Under ITSP Profile B --> SIP, I have the following:
ProxyServer           proxy.sipthor.net      <--------- You may not need this one
ProxyServerPort          (Default - 5060)   
ProxyServerTransport   (Default - UDP)     
RegistrarServer           sip2sip.info
RegistrarServerPort   (Default - 5060)     
UserAgentDomain   sip2sip.info      <--------- I don't need this one
OutboundProxy      proxy.sipthor.net   
OutboundProxyPort   (Default - 5060)     
RegistrationPeriod   600

Thanks for the further info.

Actually, it turns out that the working login combination is as follows:

Under ITSP Profile B --> SIP, I have the following:
ProxyServer           proxy.sipthor.net
ProxyServerPort          (Default - 5060)   
ProxyServerTransport   (Default - UDP)     
RegistrarServer           proxy.sipthor.net
RegistrarServerPort   (Default - 5060)     
UserAgentDomain   sip2sip.info
OutboundProxy      proxy.sipthor.net   
OutboundProxyPort   (Default - 5060)     
RegistrationPeriod   600

I may or may not need the UserAgentDomain; I haven't tried it without, but since it is working with (per the link I referenced above), I haven't tinkered further.  If I have time later tonight, I will tinker (though I hate to tinker with something working).

Oh, and the specified username does NOT include the "@sip2sip.info" (that is what was causing the 403 errors).

Right now, I have incoming calls to my Google Voice (SP1) forking nicely to my Obi connected phone, and my softphones (both on computer (Telephone for Mac) and on Android (CSipSimple)).  I am still trying to get calls to from my softphones/CSipsimple to go through to my Obi, and I may be making a further post relating to that asking for more info.

Thanks again for all your help. 
Title: Re: Using CSipSimple With OBi
Post by: azrobert on November 28, 2012, 05:55:05 PM
dinlaca,

This is how I got it working.

CSipSimple --> SIP2SIP -->  Router -->  OBi110  -->  GV or Landline

CSipSimple is sending the call to your router via SIP2SIP.
Set suffix in your phone to "@00.00.00.00:5061"
Where 00.00.00.00 is the external IP address of your router assigned by your ISP.
You can get a dns name assigned to your router, but for now use a hard coded IP address.
If you don't know your IP address go here http://www.whatsmyip.org/

In you router setup Port Range forwarding.
Forward port 5061 to the IP address of your OBi.

Name = anything
Range = 5061 to 5061
Protocol = UDP
IP Address = address

Your OBi IP address should be something like 192.168.1.110

That's it except for the config in your OBi.
You don't need the OBi registered to SIP2SIP.

After you try a call check the OBi call history.

In the left column you should see:
Terminal ID = SP2
Peer Number = Your SIP2SIP UserID.

In the right column you should see:
Terminal ID = GoogleVoice or Line
Peer Number = The number you're calling

If you have one way or no audio port range forward RTP ports 16800 thru 16998 to your OBI same as above.
Title: Re: Using CSipSimple With OBi
Post by: dinlaca on November 28, 2012, 10:13:24 PM
Quote from: azrobert on November 28, 2012, 05:55:05 PM
dinlaca,

This is how I got it working.

CSipSimple --> SIP2SIP -->  Router -->  OBi110  -->  GV or Landline

CSipSimple is sending the call to your router via SIP2SIP.
Set suffix in your phone to "@00.00.00.00:5061"
Where 00.00.00.00 is the external IP address of your router assigned by your ISP.
You can get a dns name assigned to your router, but for now use a hard coded IP address.
If you don't know your IP address go here http://www.whatsmyip.org/

Thanks for the confirmation; this is how I eventually got it working as well.

I want to try and change the hard coded 00.00.00.00 external IP address to dynamic DNS updated domain name (i.e., updated through www.zoneedit.com (where I have grandfathered free dns services), and the Apple AirPort Extreme WAN Bonjour DNS services described here (http://dyn.com/support/airport-time-capsule-with-dynamic-dns/ ), but that is off-topic and will be subject of another thread.

Quote from: azrobert on November 28, 2012, 05:55:05 PM
In you router setup Port Range forwarding.
Forward port 5061 to the IP address of your OBi.

Name = anything
Range = 5061 to 5061
Protocol = UDP
IP Address = address

Your OBi IP address should be something like 192.168.1.110

I tried it that way (with 5061).  Then, I opted to do the port forwarding of an alternate port (50xx) to avoid SIP sniffers (per OP).

Quote from: azrobert on November 28, 2012, 05:55:05 PM
That's it except for the config in your OBi.
You don't need the OBi registered to SIP2SIP.

Cool that I don't need registration.  But, I figured out the registration issue, and now it is registered (and works for both dial out and dial in).

Quote from: azrobert on November 28, 2012, 05:55:05 PM
After you try a call check the OBi call history.

In the left column you should see:
Terminal ID = SP2
Peer Number = Your SIP2SIP UserID.

In the right column you should see:
Terminal ID = GoogleVoice or Line
Peer Number = The number you're calling

If you have one way or no audio port range forward RTP ports 16800 thru 16998 to your OBI same as above.


Call history confirms working.  No one-way audio issues (though it is occasionally a little garbled - best codec to use for this set-up on Csipsimple is . . .?)

Thanks to all of you for such amazing help and direction; I would not have been able to accomplish this without your great help. 

Off to open that next thread about getting DNS services broadcasting, either from OBi (through AirPort Extreme) or from AirPort Extreme.
Title: Re: Using CSipSimple With OBi
Post by: dinlaca on November 29, 2012, 12:50:10 AM
A couple of more observations I have:

If you add a filter of "Directly Call" and "All", then you won't be prompted in native phone dialer to choose between Mobile Phone and SIP account; all calls will be made through the SIP account.

Also, re: the version of Csipsimple which works, I too initially had difficulties getting things to work and stay working with the newer versions.  But, I set up the SIP plan/account with the 1899 version available at nightlies.csipsimple.com/trunk, and then upgraded directly to the 2025 version available there, and have not had a problem since the upgrade (other than sound quality, but I am still working on that codec).

Thanks so much for having motivated me to integrate my cell use (through data plan) into a very functional Google Voice plan through my OBi110.

Now, the last step which would make this PERFECT would be to find a solution that permits both outgoing and incoming calls over the cell phone through cell data plan without use of a third party sip provider (like sip2sip.info); it would have one less step (and one less company to worry about going under), and that much more long term reliability.  But, I will leave that for better minds than me to figure out.
Title: Re: Using CSipSimple With OBi
Post by: ianobi on November 29, 2012, 06:53:01 AM
dinlaca,

Good to see your setup working so quickly. It took me longer than that and I'm still fine tuning!

Your observations on CSipSimple are interesting. I may try an upgrade later using your suggestion.

For further investigations, it is worth looking at your account web page on sip2sip. "History" has a really good SIP debug section to show exactly what happens to a call. When in the debug mode for a call hit the "media" button to show codecs etc.

I'm sure that you have realised that the sip2sip account on your sp2 is there for outbound calls and is not needed for the inbound calls to the OBi. However, it can be used as just another SIP service for any calls coming into sp2.

QuoteNow, the last step which would make this PERFECT would be to find a solution that permits both outgoing and incoming calls over the cell phone through cell data plan without use of a third party sip provider (like sip2sip.info)

I have thought about this, but never managed to make it work! It's quite easy to set this up using a softphone or ATA where you know the IP addresses. It requires using peer to peer calling without registration. There are examples on this forum. When on home wifi, I can call the android phone at its wifi address using something like sp2(anything@192.168.1.12). I cannot seem to call the other way. This needs more testing – any volunteers?   :)
Title: Re: Using CSipSimple With OBi
Post by: azrobert on November 30, 2012, 09:06:19 AM
said by ianobi:
QuoteNow, the last step which would make this PERFECT would be to find a solution that permits both outgoing and incoming calls over the cell phone through cell data plan without use of a third party sip provider (like sip2sip.info)

I have thought about this, but never managed to make it work! It's quite easy to set this up using a softphone or ATA where you know the IP addresses. It requires using peer to peer calling without registration. There are examples on this forum. When on home wifi, I can call the android phone at its wifi address using something like sp2(anything@192.168.1.12). I cannot seem to call the other way. This needs more testing – any volunteers?

All that is needed is a softphone app that doesn't require registration.
The only one I found is Mizudroid, but it doesn't send username with no registration. Don't know if this is a bug or intentional.

Do you know of any softphone apps that don't require registration?   


Update:

My above post isn't true.
You would only have outbound calls from your handset.
Something else would be needed for inbound.
Title: Re: Using CSipSimple With OBi
Post by: hwittenb on November 30, 2012, 08:09:50 PM
Quote from: azrobert on November 30, 2012, 09:06:19 AM
All that is needed is a softphone app that doesn't require registration.
The only one I found is Mizudroid, but it doesn't send username with no registration. Don't know if this is a bug or intentional.

Do you know of any softphone apps that don't require registration?   

The mobile phone softphone app Acrobits (plus their enhanced softphone Groundwire) has an configuration option for a sip account to not register.  In the settings it is a check mark to set the account for outgoing calls only.  The softphone allows you to setup multiple voip accounts so you can have one account like this and a different account that registers for incoming calls. 

This is a report of my Acrobits test today. I setup a direct account on Acrobits to send dialed digits to my OBi110.  I setup the account with my OBi's DynDNS symbolic address and my SP2 sip port as the account proxy server and I set it not to register.  The sip port number is set to forward in my router to the OBi.  This should allow single stage outbound dialing thru the OBi. On SP2 I setup an inbound routing element to send the dialed digits to SP1 based on the incoming caller.  This will bridge the call out thru Google Voice. Calls seemed to work well except for dtmf digits transmitted over the in-progress call after the call was connected.  Maybe the dtmf problem was due to my LG mobile phone.

I have SP2 setup to register to a voip provider.  When I altered the inbound routing on the OBi to try to bridge the call back out thru SP2 or a VGx tied to SP2 there were audio problems and this technique was not satisfactory.  Altering the inbound routing on the OBi to bridge the call on the Line port was OK except for the dtmf problem mentioned above.
Title: Re: Using CSipSimple With OBi
Post by: ianobi on December 01, 2012, 04:52:12 AM
Interesting tests! It would seem that direct peer to peer calling is possible from cell phone to OBi as hwittenb suggests. This does give a free link to the OBi and all its services without a third party being involved. Calls from OBi to a cell phone are always going to need a third party that is registered, as the cell phone IP address will be unknown - except as i suggested if you are at home on home wifi.

QuoteWhen I altered the inbound routing on the OBi to try to bridge the call back out thru SP2 or a VGx tied to SP2 there were audio problems and this technique was not satisfactory.

I changed this in all my trunks and it seems to solve some problems:

Voice Services > SPX Service > MaxSessions: 4
Title: Re: Using CSipSimple With OBi
Post by: hwittenb on December 01, 2012, 09:55:30 AM
I tried a new Acrobits test today using my OBi202.  I called an unused SP1 setup as RonR outlined with the proxy at 127.0.0.1 with an incoming call routing to bridge the call to SP2 setup as voip.  The bridging worked very well.  The transmission of dtmf after the call completed worked fine better than the OBi110 test.  My guess is the OBi202 has more horsepower than the OBi110.

I also tried calling SP2 and then bridging the call out on SP2.  The call connects and bridges but the RTP sound packets don't start up.  Similiar to what happens with the OBi110.
Title: Re: Using CSipSimple With OBi
Post by: ianobi on December 03, 2012, 07:58:39 AM
@ hwittenb.

I can reproduce your findings on my OBi110. If I use a "registered" account on sp2, then all direct calls through trunks and to the OBi phone work fine, but calls bridged through the auto attendant drop out within ten seconds. Unchecking X_RegisterEnable fixes the problem, but then of course you can only make outgoing calls on that service. Using the RonR method seems the best answer:

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)
Voice Services -> SP2 Service -> X_RegisterEnable : (unchecked)
Voice Services -> SP2 Service -> X_ServProvProfile : B

With this set up we don't need another sip2sip account on the OBi as outgoing calls from sp2 will go to the android sip2sip account just fine as it is.

It is possible to set up an account in CSipSimple to call without registration. I have done this and made calls both ways with no third parties involved, but only using wifi. I set up a dynamic dns provider on my android phone, but the app tells me I am behind a proxy so it will not work. As things stand we have:

Android phone <> sip2sip <> OBi

The only problems with this setup seems to be that sip2sip does not pass Caller ID and through calls from android phone to OBi need to go out from OBi on a different trunk to the one they come in on. I don't see any dtmf problems.

Plenty to think about  ::)
Title: Re: Using CSipSimple With OBi
Post by: QBZappy on December 03, 2012, 08:25:27 AM
Ian,

sip to sip calls should pass CID. That is one of the features of sip.
Title: Re: Using CSipSimple With OBi
Post by: ianobi on December 03, 2012, 08:29:26 AM
QBZ,

I agree! Problem is the actual provider sip2sip really does not like us using ui=$1 to pass userid on. I would be happy to be wrong  :)
Title: Re: Using CSipSimple With OBi
Post by: QBZappy on December 03, 2012, 08:38:17 AM
Ian,

Quote from: ianobi on December 03, 2012, 08:29:26 AM
using ui=$1 to pass userid on.

This code is unique to OBi products. It did not work very well when I tested it with Freephoneline. It showed CID only after 7 rings, making it useless with this SP. I think the CID should be delivered using a more conventional sip method, perhaps using sip uri. I believe that you have tested that without success. Just a stab in the dark, I remember that "X_UseRefer" setting carries the CID in the header in particular use cases. I'm not certain if this is relevant in your case.
Title: Re: Using CSipSimple With OBi
Post by: ianobi on December 03, 2012, 09:33:50 AM
QBZ,

Thanks for the idea, but no luck. With or without X_UseRefer the Caller ID is getting passed on when I fork an incoming call using ui=$1. I see this in Call History:

Forking to:PHONE1, SP2(459xxxxx@sip2sip.info;ui=07511xxxxxx)

The correct userid is being passed to sip2sip, but it seems to make sip2sip ignore the call altogether. I suspect the Caller ID passed on to sip2sip is somehow upsetting the account credentials.
Title: Re: Using CSipSimple With OBi
Post by: ianobi on December 03, 2012, 10:31:18 AM
With only a proxy (127.0.0.1) set up on sp2, then X_SpoofCallerID works perfectly! Now on an incoming call to OBi forked to CSipSimple via the sip2sip account registered on CSipSimple, Caller ID is passed as it should be!

I may treat myself to a beer later  :D
Title: Re: Using CSipSimple With OBi
Post by: QBZappy on December 03, 2012, 10:48:16 AM
Ian,

I'll bring the potato chips.  Everyone welcome. We'll make a it our annual Christmas party. :D
Title: Re: Using CSipSimple With OBi
Post by: azrobert on December 03, 2012, 02:04:19 PM
I finally got this setup to work with CALLERID!!!!!!!!!!!!!!

My OBi110 Setup:

SP1 = GV
         X_InboundCallRoute = {ph,sp2(MYUSERID@sip2sip.info)}

SP2 = SIP Provider (not SIP2SIP)
          Registration Disabled
          X_SpoofCallerID  Enabled

All I did was turn off registration on SP2 and it started working.
It still doesn't work with $ui.

You don't need the OBi registered to SIP2SIP for this to work.
The only place I have SIP2SIP defined is on the inbound call route.
Just turn off registration for the SPx you're using to route inbound calls to your android.


Edit: I guess I'm a little late.  ianobi already solved the problem.
Title: Re: Using CSipSimple With OBi
Post by: ianobi on December 03, 2012, 10:47:39 PM
It's always reassuring when someone else reaches the same conclusion  :)
Title: Re: Using CSipSimple With OBi
Post by: duzlu_it on January 22, 2013, 02:33:18 PM
There is an Android app called "Servers Ultimate" that will run a Dynamic DNS server on your cell phone (much like a router does for your router's wan connection).  It is programming the IP into my DDNS provider (DynDNS.com), but I haven't tried it to deliver an incoming SIP call.

Don B.
Title: Re: Using CSipSimple With OBi
Post by: azrobert on February 04, 2013, 03:46:30 PM
I have a new method of using CSipSimple to directly initiate calls on an OBi, eliminating Sip2Sip.

I was reading ianobi's topic "Using Any OBi as a Home PBX" where he uses CSipSimple without registration and a light bulb came on in my head. If you like my solution, credit should go to ianobi for pointing me in the right direction.

In CSipsimple add a new account.
Select BASIC
Account name = anything
User = robert
Server = me.dyndns.com:5061
Password = anything
SAVE

Press and hold on the account name.
When a new screen appears select "Choose Wizard".
Select Expert
Select your account again.
Select Registration URI and blank it out, then ok.
SAVE

In OBi's SP2 X_InboundCallRoute add:
{(robert)>(xxxxxxxxxx):sp1}

That's it. Dial a number on your Android and the call will go out SP1.
No CSipSimple filters.
Eliminating Sip2Sip should improve latency by a few milliseconds.

This is for outbound calls only. You would need to register another account on Sip2Sip to receive calls.

I have SP2 registered to a Provider and I still received CallerID from SP1 forked calls, so something has changed.

Title: Re: Using CSipSimple With OBi
Post by: cpetro on February 05, 2013, 05:57:19 AM
First of all, I would like to thank all the super smart people on this forum for spending their valuable time helping folks.  This thread in particular is jam packed with knowledge and has really sparked my interest in SIP!  I must have read through it 100x. 

I've got SP1 attached to GV and SP2 setup unregistered to sip2sip on my Obi110.  Incoming GV calls are getting forked to my CSipSimple client on my Android beautifully.  It's simply amazing how well it works!  The key to my setup was enabling ICE in CSipSimple.

Now my cry for help...

I followed azrobert's method above to get calls from CSipSimple to go into SP2 and and out GV.  The calls are going through to the other end but there is no audio once connected.  I have tried forwarding UDP ports 16800-16998 and also putting the Obi on my DMZ but no luck.  Any suggestions?
Title: Re: Using CSipSimple With OBi
Post by: azrobert on February 05, 2013, 06:43:33 AM
I'm assuming your Android is connected to the same router as the OBi.

Get the assigned IP address of your Android from your router.
Port forward UDP ports 4000-4007 to IP of the Android.
These are the CSipSimple RTP ports.

You should only have this problem when the Android and OBi are on the same LAN.

Edit:

Also include ports 16600-16798 forwarded to OBi.
Title: Re: Using CSipSimple With OBi
Post by: azrobert on February 05, 2013, 07:05:04 AM
Quote from: cpetro on February 05, 2013, 05:57:19 AM

I've got SP1 attached to GV and SP2 setup unregistered to sip2sip on my

FYI SP2 only needs to be enabled as SIP, therefore you can use SP2 for another provider other than Sip2Sip.
Title: Re: Using CSipSimple With OBi
Post by: cpetro on February 05, 2013, 07:31:55 AM
Quote from: azrobert on February 05, 2013, 06:43:33 AM
I'm assuming your Android is connected to the same router as the OBi.

Get the assigned IP address of your Android from your router.
Port forward UDP ports 4000-4007 to IP of the Android.
These are the CSipSimple RTP ports.

You should only have this problem when the Android and OBi are on the same LAN.


Wow thanks for responding azrobert!

I'm not using my Android on WiFi...it's on 3g or 4g.  Correct me if I'm wrong, but isn't the Obi listening on 16800?  I tried changing the RTP start port in CSipSimple to 16800, but still no audio.
Title: Re: Using CSipSimple With OBi
Post by: QBZappy on February 05, 2013, 07:44:00 AM
cpetro,

It might be an issue related to codec. Make sure that the app is using 711 codec. Here are the test numbers for sip2sip:
http://wiki.sip2sip.info/projects/sip2sip/wiki/SipTesting
Title: Re: Using CSipSimple With OBi
Post by: azrobert on February 05, 2013, 07:58:22 AM
Did you see my edit above?

SP1 uses 16600-16798
SP2 uses 16800-16998
Title: Re: Using CSipSimple With OBi
Post by: cpetro on February 05, 2013, 08:36:25 AM
I'm trying to go

CSipSimple --> router --> SP2 --> fork that call out of GV on SP1

Can I do it this way?  The desired result is exactly like OBION except using CSipSimple. 

Using azrobert's setup, calls from CSipSimple on 3g/4g/wifi are making it all the way but when the person answers it's just dead air.  Putting the Obi on my DMZ basically eliminates routing as the issue, so I'm thinking its an Obi or CSipSimple setting that I'm missing.  It feels like I'm soooo close and I've been banging my head on this for days!
Title: Re: Using CSipSimple With OBi
Post by: QBZappy on February 05, 2013, 08:59:29 AM
cpetro,

Did you try 711 codec?
Title: Re: Using CSipSimple With OBi
Post by: cpetro on February 05, 2013, 09:22:10 AM
I have all the codecs selected in CSipSimple, but none are specifically G711.  The call info shows PCMU 8khz while on the 'dead air' call.  That's the same codec info shown on an incoming GV call forked to my Android from the Obi.
Title: Re: Using CSipSimple With OBi
Post by: QBZappy on February 05, 2013, 12:32:55 PM
cpetro,

Can you get the sip2sip test numbers referenced above?
Title: Re: Using CSipSimple With OBi
Post by: azrobert on February 05, 2013, 12:45:54 PM
It works for me using WiFi.
I currently don't have a data plan for my Android, so I can't test 3G.
Maybe you should try the original method of routing thru Sip2Sip to your router.
Title: Re: Using CSipSimple With OBi
Post by: cpetro on February 05, 2013, 01:04:42 PM
Thanks for all your help QBZappy and azrobert! 

I'm able to call the test numbers from the CSipSimple dialpad without any problems.  The call info shows the same PCMU codec and the sound quality is good to go. 

Decided I'm going to take your advice and go through sip2sip again.  My data plan is unlimited and very fast so I pretty much never turn my wifi chip on to save battery.  After I get calls working the way I want, I'm going to work on switching to TCP keepalives to save a little more.   ;D
Title: Re: Using CSipSimple With OBi
Post by: azrobert on February 05, 2013, 02:32:55 PM
Just curious.
Has anyone got my method of bypassing Sip2Sip to work?
Title: Re: Using CSipSimple With OBi
Post by: hwittenb on February 05, 2013, 04:57:57 PM
Quote from: azrobert on February 05, 2013, 02:32:55 PM
Just curious.
Has anyone got my method of bypassing Sip2Sip to work?
azrobert,

Yes it works for me on my local home network.  I plan to check it out later over the internet when I'm away from home.

Those are good instructions you posted on how to setup CSipSimple and the incoming routing for the OBi.

I think cpetro is experiencing some router problems that are hard to pin down.

Edit:  I did test the direct ip one stage dialing over the internet.  I got it to work over the internet using wifi, over 3G data the call connected but had audio problems.  I need to study it some more to possibly find a solution.

Over wifi the key setting calling my network was setting CSipSimple to use a STUN server.  I also tried ICE and ICE+STUN and neither setting.  CSipSimple worked with a STUN server.  Over 3G I also tried those settings but had audio problems.  My OBi was not setup to use a STUN server on its side of the incoming call.  I ran the wifi test over a public wifi hotspot at my local Safeway grocery store.
Title: Re: Using CSipSimple With OBi
Post by: ianobi on February 06, 2013, 06:10:15 AM
azrobert,
QuoteJust curious.
Has anyone got my method of bypassing Sip2Sip to work?

I think that I tried something similar when I first tried using CSipSimple with OBI, but I cannot remember the exact details of my tests. I think that I had audio problems. You are right, it would be better if we could have direct calling instead of via sip2sip - less latency etc. Now that you have sparked this subject back to life, others seem to be coming forward with some good ideas.

When I get time, I will have another go using your setup and maybe experiment with STUN / ICE etc.
Title: Re: Using CSipSimple With OBi
Post by: cpetro on February 06, 2013, 10:38:08 AM
I'm very pleased to report that I've been successful setting up incoming/outgoing GV calls on 3g/4g/wifi with CSipSimple through sip2sip!   ;D  ;D  ;D  Thanks again!

I'm able to keep all the ALG firewall stuff enabled and I only had to forward the SP2 UserAgent port on my router.  It's a D-Link DGL-4500 if anyone cares to know.  Battery life on my Galaxy Note 2, as expected, is suffering now.  When I figure out how to get TCP keepalives working with sip2sip I should be better off.

Everyone I showed it to is envious!  This Obi is a fantastic device to tinker with.  Now I get to buy a cordless phone setup for my house and a 64gb microsdxc card to store these auto-recorded calls!    ;)
Title: Re: Using CSipSimple With OBi
Post by: QBZappy on February 06, 2013, 10:45:49 AM
Quote from: cpetro on February 06, 2013, 10:38:08 AM
Everyone I showed it to is envious!  This Obi is a fantastic device to tinker with.  Now I get to buy a cordless phone setup for my house and a 64gb microsdxc card to store these auto-recorded calls!    ;)

There has been some interest in a feature like this. The concept could be a nice work around for those in need of this feature.
Title: Re: Using CSipSimple With OBi
Post by: ianobi on February 10, 2013, 05:04:40 AM
I finally got around to more testing. I find exactly the same as hwittenb in reply #40.

One odd thing: I have a very simple CSipSimple account that I use to make my cell phone into a wifi phone + cell phone when at home. This is described in "Using Any OBi as a Home PBX" and is great for picking up calls via the OBi as well as via the cell network. When using STUN settings for the separate test account for this testing, my simple "wifi" account would not work. This was the case even when I disabled STUN in the "wifi" acoount.

The problem seems to be our old problem of OBi using the external router address in some circumstances even when it does not need to. Deleting the STUN settings in my CSipSimple main settings menu solved my problem for the "wifi" account.
Title: Re: Using CSipSimple With OBi
Post by: duzlu_it on April 30, 2013, 12:52:48 PM
Has anyone been able to get CSipSimple to work with an Obi110 over 3G/4G without the need for Sip2Sip?  I've been working on it for days, but have the same problems as other's have mentioned - no audio when the line is answered.  I've used DMZ, STUN, ICE, port forwarding, port triggering, symmetric RTP, turned on and off the firewall API for SIP in my router, etc. etc. etc.  It seems like there is a problem negotiating and/or opening the RTP ports when the client is on a 3G/4G internet connection.  I would really like to get this to work, as the latency is quite noticeable when going through Sip2Sip.
Title: Re: Using CSipSimple With OBi
Post by: jjjooonnn on May 12, 2013, 09:36:40 PM
I'm trying to use CSipSimple for poor quality wifi sources eg: College, Starbucks, McD's... since the OBi app isn't exactly up to par.

I know nothing!~

How do I use Mcot in all this? Is it: {(Mcot:username@sip2sip.info) or just {(username@sip2sip.info) and is it in all the spots that say (Mcot)?

Looking in the SIP settings in OBi's interface, where can I find sip2sip's URI? In sip2sip account info is it XCAP Root?
And finally: Is the UserAgentPort the port that connects to OBi?
Thank you, for any help!

Quote from: ianobi on November 25, 2012, 03:26:42 AM
{(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.

Voice Services -> SP2 Service -> X_InboundCallRoute (SP2 must be configured for SIP):

At the OBi end I used sp2 for incoming calls, my UserAgentPort is 5071.
Title: Re: Using CSipSimple With OBi
Post by: ianobi on May 13, 2013, 01:59:07 AM
QuoteHow do I use Mcot in all this? Is it: {(Mcot:username@sip2sip.info) or just {(username@sip2sip.info) and is it in all the spots that say (Mcot)?

cot is a User Defined Digit Map. If your sip2sip account is 12345678@sip2sip.info, then put it in cot like so:

User Settings > User Defined Digit Maps > User Defined Digit MapX >
Label: cot
DigitMap: (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.

QuoteLooking in the SIP settings in OBi's interface, where can I find sip2sip's URI?

For incoming calls your OBi does not need to know the sip2sip URI. It will route calls based on the "username", which it sees as CallerID. "12345678" in the example above.

For calls to be forwarded from say an incoming call on SP1 something like this would be needed:

Voice Services -> SP1 Service -> X_InboundCallRoute:
{sp2(userid@sip2sip.info),ph}

In my examples I am using sp2 for incoming and outgoing calls from and to sip2sip.

QuoteIs the UserAgentPort the port that connects to OBi?

Each spX has its own UserAgentPort. For example an OBi110 at default uses sp1 – port 5060, sp2 - port 5061. Many of us change these to avoid sip scanners. In my example I used sp2 and changed the UserAgentPort to 5071. When connecting from CSipSimple to the OBi calls would be routed using @my.ddns.com:5071. The @my.ddns.com reaches my router and the port 5071 tells the router to send the call to sp2 on my OBi.


Most people find that the hardest part of this setup is configuring the CSipSimple filter rules. Good luck!
Title: Re: Using CSipSimple With OBi
Post by: jjjooonnn on May 17, 2013, 02:05:34 PM
@ianoboi

Thank you for that! -I finally got it... somewhat working...
All the calls I make from CSipSimple... ring my OBi houseline!
I am receiving calls on CSipSimple (rings my house, cell(forwarded from google voice's page), and CSipSimple. I think its a problem with the ports ??? I'm glad I can get calls!

   Here are my settings, I tried to move all the ports to 5071 like you mentioned, but sip2sip doesn't connect unless there are all set to 5060, these have it working for now (except ring all calls placed only ring my OBi houseline)

On CSipSimple I'm using a DDNS with the filter rules (using @ddnsaddress:5060)

ITSP Profile B SIP settings (everything else default)

ProxyServer         proxy.sipthor.net
ProxyServerPort      5060
ProxyServerTransport   UDP   
RegistrarServer      sip2sip.info   
RegistrarServerPort   5060         
UserAgentDomain      sip2sip.info   
OutboundProxy      proxy.sipthor.net      
OutboundProxyPort   5060   
RegistrationPeriod      600   

Under SP2 Service I have the Mcot lines you orginally posted (with cot defined in User Settings as my sip2sip username w/o @sipp2sip.info)
So close! -yet so far way!
Title: Re: Using CSipSimple With OBi
Post by: ianobi on May 18, 2013, 02:22:22 AM
jjjooonnn,

There was some confusion in the first few posts of this thread. I may need to go back and sort it out! There is no need for a sip2sip account on the OBi. Only set up sip2sip as an account on the CSipSimple app. If using sp2, then set up the OBi as follows:

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

With this set up we don't need another sip2sip account on the OBi as outgoing calls from sp2 will go to the android sip2sip account just fine as it is.

Remember each spX needs a separate UserAgentPort. For example, you might use 5070 for sp1 and 5071 for sp2. Now if using 5071, then this should work:
On CSipSimple use a DDNS with the filter rules (using@ddnsaddress:5071).

You may need to port forward 5071 in your router.

You are almost there! Let us know how you get on.
Title: Re: Using CSipSimple With OBi
Post by: azrobert on May 18, 2013, 08:34:13 AM
Quote from: jjjooonnn on May 17, 2013, 02:05:34 PM

All the calls I make from CSipSimple... ring my OBi houseline!

If I understand you correctly everything is working except when you make an outbound call from CSipSimple it rings your OBi phone.

If this is happening then your Mcot is not matching the Username of Sip2Sip.

I can think of 2 reasons for this to occur.

You had a typo when you created the Mcot. I'm sure you checked this 5 times, so I don't think this is the cause.

You are using OBi reserved characters (MmSsXx) in your Sip2Sip Username.

If this is the case put single quotes around special characters in your Mcot like this:
(u's'erna'm'e)

Title: Re: Using CSipSimple With OBi
Post by: ianobi on May 18, 2013, 09:42:40 AM
azrobert,

Good call. I have been caught out myself once or twice by reserved characters. Now I use eight digit numbers as userids, so I cannot be caught again. Birthdays, birthdays backwards etc are easy numbers to remember. Of course, one of these days I'm going to forget my own birthday ...  :)
Title: Re: Using CSipSimple With OBi
Post by: azrobert on May 18, 2013, 10:27:27 AM
There is another way of doing this so you won't get in trouble with reserved characters.
Don't use a user defined DigitMap and don't put parentheses around the string like this:

{name1,name2>(Msp1):sp1}

When you don't use parentheses around the user names they become literals and reserved characters are allowed.
Title: Re: Using CSipSimple With OBi
Post by: ianobi on May 18, 2013, 10:48:53 AM
That does solve the reserved character problem. In a fairly simple setup it's probably a good idea.

Looking at my "cot" I have seven different userids - two OBis, two OBi softphone numbers, other softphones, other accounts etc. My sp2 is a general route into my OBi for lots of accounts, not only CSipSimple. Looking at my original post there are 15 references to "Mcot" in the InboundCallRoute, so it would become hard to read and maybe over the 512 character limit. Also, adding or changing a userid is a simple matter if you only have to change "cot".

As with all things OBi-related it all depends on individual setups. If it was simple this forum would be a lot smaller and a lot less interesting!
Title: Re: Using CSipSimple With OBi
Post by: jjjooonnn on May 19, 2013, 09:49:22 AM
I'm sorry, this is what I'm working with, I'm wondering if maybe router DDNS settings maybe involved, but when I enter the address I can get to my router from external networks, so should be reaching my network, this is crazy!  ???

Here is a link to all the settings mentioned as I put them (I'm using my real ddns, I just changed it in this pic): https://plus.google.com/u/0/111737898109693132669/posts/RTj7MXhmkCG (https://plus.google.com/u/0/111737898109693132669/posts/RTj7MXhmkCG)
Title: Re: Using CSipSimple With OBi
Post by: ianobi on May 19, 2013, 10:41:34 AM
jjjooonnn,

I cannot see any obvious problems with your settings. After a call from CSipSimple to your OBi has finished, what does "Call History" show? You need to look at your local OBi web page (get ip address by dialling ***1. User name and password are both "admin" by default.), then Status > Call History. Does it show the call coming in on SP2? Any "Peer Number" received? If so then we know the routing is ok.

When dialling from your cell phone you should be dialling from the native android dialler, not the CSipSimple Dial pad.

The sip2sip web site has very good call logging information, which might help to see what is being received by their servers and passed on.

If you can, then make the test calls using a wifi connection.

I'm not here much next week, so I hope others will jump in. Keep posting - there is always an answer!

Title: Re: Using CSipSimple With OBi
Post by: jjjooonnn on May 19, 2013, 01:10:34 PM
Under Call History it says:
Terminal ID SP2  PHONE1
Peer Number 8134219536
Direction Inbound

When dialing from android, I select a contact (all the numbers are in +18135551234 format) then it asks to use CSip or mobile (pic in link) I use CSip.

I took some more screenshots (call histoy,sip serverlogs and phone): https://plus.google.com/photos/111737898109693132669/albums/5879730141006063857

Thanks again for the help! I'm wondering, maybe it is related to what you said about another sip2sip account?
QuoteI 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.[\quote]
Title: Re: Using CSipSimple With OBi
Post by: azrobert on May 19, 2013, 03:46:47 PM
In Service Provider -> ITSP Profile A -> General -> DigitMap you have a rule:
1xxxxxxxxxx

Try changing it to:
+?1xxxxxxxxxx

This will get a match if the dialed number has a + prefix or not.

This is the default DigitMap for an OBi110:
(1xxxxxxxxxx|<1>[2-9]xxxxxxxxx|011xx.|xx.|(Mipd)|[^*#]@@.)

This is what I want you to try:
(+?1xxxxxxxxxx|<1>[2-9]xxxxxxxxx|011xx.|xx.|(Mipd)|[^*#]@@.)

(Msp1) points to this DigitMap
Title: Re: Using CSipSimple With OBi
Post by: azrobert on May 19, 2013, 04:27:19 PM
I just looked at your screen shots and you're not prefixing the dialed number with "**1", so I think you need another change.

Is your only requirement routing calls out SP1?

If the answer is yes then change the SP2 Inbound Call Route to:

{(Mcot)>(<**7:>(Msp1)):sp1},{ph}

You are comparing your Sip2Sip UserId to Mcot
and
comparing the dialed number to Msp1 plus prefix **7
If you get a match the **7 is stripped off and the call is routed out SP1.
If you don't get a match the call is routed to the Phone Port.


If you are using the default SP1 DigitMap you don't need the **7 prefix.

Remove the **7 prefix in CSipSimple.
You also don't need the User Defined DigitMap cot.

Change the SP2 Inbound Call Route to:
{8134219536>(Msp1):sp1},{ph}

You are comparing your Sip2Sip UserId to 8134219536
and
comparing the dialed number to Msp1.
If you get a match the call is routed out SP1.
If you don't get a match the call is routed to the Phone Port.

Title: Re: Using CSipSimple With OBi
Post by: jjjooonnn on May 19, 2013, 06:09:53 PM
@axrobert  ;D 8)

QuoteIf you are using the default SP1 DigitMap you don't need the **7 prefix.

Remove the **7 prefix in CSipSimple.
You also don't need the User Defined DigitMap cot.

Change the SP2 Inbound Call Route to:
{8134219536>(Msp1):sp1},{ph}

THIS! -Solve it! You're Awesome!

I made the changes above and everything chimed together!

My phone set up is now, as follows (for your consideration):
I'm using a $100 tmobile 1,000 minutes card on a smart phone with the calls getting forwarded by google voice; the only down side is that I don't have data for google maps or pandora when driving, it's only for calls (texts aren't forwarded).
Then I can use this on college/home wifi all from the same phone,
And my OBi line to use for those important calls at the house.
This will save me around $380 a year in cell phone bills, I'm hoping everyone can see how cool this is!

Here's some newbie follow up question (feel free to ignore, I'm very grateful for you guys' help):

What's best for fast/slow connections, SILK 24/G729?

And do these codecs need to be compatible with the OBi's codecs or google voice's servers?

ianobi, so from what I read it looks like STUN/ICE is a no-go huh?
Title: Re: Using CSipSimple With OBi
Post by: ianobi on May 20, 2013, 08:40:41 AM
Good DigitMap detective work there by azrobert   :)

I accept that some users do find my InboundCallRoute a little daunting. Its aim is to be all things to all people. It allows any device to call in and use single stage dialling to call out on any service on the OBi. This includes direct calling to the auto attendant or to the local OBi phone so you can call home directly. The **7 is needed in some parts of the world to avoid conflict with the sip2sip servers. I have **7 rules and the non **7 equivalents to allow local softphones etc to also use sp2 for single stage dialling through the OBi. At home I also use a different CSipSimple account to convert my cellphone into a local wifi phone to connect with my home OBi the same way as the Phone Port phone. All these work through the sp2 InboundCallRoute.

So that's why its so complicated   :D

Having said all that, I do believe in keeping things simple if that's possible. If your need is simple then use a simple InboundCallRoute.

With regard to STUN and ICE, my advice is to only try them if you have problems. Here is an extract from the sip2sip website:

QuoteSTUN Servers
You may use STUN for ICE NAT traversal. The STUN servers can be found in the DNS by using SRV lookup for _stun._udp.sip2sip.info.

NAT Traversal¶
SIP2SIP infrastructure is smart enough to handle the NAT traversal for both SIP signaling, RTP and MSRP media sessions. Also it supports ICE negotiation in the clients and provides automatically a TURN relay candidate.

Practically, you should not set any NAT traversal features in the client as the chance of fixing things is much smaller than breaking them.
•   Do not use STUN for Register purposes
•   Do not set your client to discover a global IP address
Title: Re: Using CSipSimple With OBi
Post by: azrobert on May 20, 2013, 10:00:41 AM
Quote from: ianobi on May 20, 2013, 08:40:41 AM
I accept that some users do find my InboundCallRoute a little daunting.

The first time I saw that inbound route my eyes crossed. LOL

Without thinking about it much I always thought the **7 prefix was to avoid conflict with your Phone Port DigitMap (prefixing numbers with **n). I see that was faulty analysis. I had no idea why the **7 and non **7 testing. Thanks for the explaination.
Title: Re: Using CSipSimple With OBi
Post by: jjjooonnn on May 20, 2013, 05:12:07 PM
Getting to this setup has been quite a learning experience!
My working setup: https://plus.google.com/111737898109693132669/posts/RTj7MXhmkCG (https://plus.google.com/111737898109693132669/posts/RTj7MXhmkCG)

I'm sure a lot of others are in the same boat, since the obi app is SOooo outdated, CSipSimple is really the only viable option for anyone.

I'll keep the STUN/ICE options in mind whenever I'm on public WiFi, I'll give it a go.

You've been a great help anobi. For a 6month old post, to still get a response it amazing enough!  (both of you ianobi, azrobert, again thank  you)
Title: Re: Using CSipSimple With OBi
Post by: odyindfamily on June 19, 2013, 12:18:52 PM
Hi jjjooonnn

I want to setup this softphone option in replacement to the OBIon App on my android phone. It's seems your working setup location is giving that this post is deleted. Can you please share the steps involved to use my OBI110 device and CSipSimple softphone on the android device. Thank you in advance.
Title: Re: Using CSipSimple With OBi
Post by: jjjooonnn on July 29, 2013, 03:21:11 PM
Sorry, haven't checked this post in forever and the link was broken. Try this one: https://plus.google.com/111737898109693132669/posts/HXRCx8hiTWo
Title: Re: Using CSipSimple With OBi
Post by: lguerra10 on September 11, 2013, 04:32:02 PM
I am using the beautiful method proposed by azrobert quoted below
I have sp1 in OBI 110 connected to Google Voice and I am trying to call from my cell phone through OBI 110

In the method described by azrobert my User name is maria
In OBi's SP2 X_InboundCallRoute, I am using the following rule:{('maria'):sp1} (the rule proposed by azrobert does not work for me)

when I dial any phone using CsipSimple I hear  my cell-phone ringing for ever until it times out or until I stop the process, but the person that I ring does not hear the phone ringing, so obviously something does not work.

The call history, though, is exactly the same than when using OBION (the android client from OBI). OBION works just fine. Here you have the call history

Call 13   09/11/2013    22:41:13   

Terminal ID   SP2   GoogleVoice1
Peer Name     Mariatweidner   
Peer Number   maria   7146513070
Direction   Inbound   Outbound
22:41:13   Ringing   
22:41:16      Call Connected
22:41:30   End Call   

Call 14   09/11/2013    22:18:37   

Terminal ID   OBiTALK1   GoogleVoice1
Peer Name     Luis phone   
Peer Number   290367476   7146513070
Direction   Inbound   Outbound
22:18:37   Ringing   
22:18:40      Call Connected
22:18:47   End Call

any idea as to why this may happen and how to correct this?

Thanks   

Quote from: azrobert on February 04, 2013, 03:46:30 PM
I have a new method of using CSipSimple to directly initiate calls on an OBi, eliminating Sip2Sip.

In CSipsimple add a new account.
Select BASIC
Account name = anything
User = robert
Server = me.dyndns.com:5061
Password = anything
SAVE

Press and hold on the account name.
When a new screen appears select "Choose Wizard".
Select Expert
Select your account again.
Select Registration URI and blank it out, then ok.
SAVE

In OBi's SP2 X_InboundCallRoute add:
{(robert)>(xxxxxxxxxx):sp1}

That's it. Dial a number on your Android and the call will go out SP1.
No CSipSimple filters.


Title: Re: Using CSipSimple With OBi
Post by: ianobi on September 12, 2013, 03:42:33 AM
Iguerra - welcome to the forum.

Try this rule in your InboundCallRoute:

{('maria')>(xx.):sp1}


The most reliable way I have found of using CSipSimple calling in directly is here:

http://www.obitalk.com/forum/index.php?topic=6211.msg39466#msg39466

Note: This method does need another registered sip service to "piggy-back" off.
Title: Re: Using CSipSimple With OBi
Post by: lguerra10 on September 12, 2013, 08:19:13 AM
Thanks ianobi for the help
{('maria')>(xx.):sp1} behaves the same than {('maria'):sp1} with the exception that I do not hear the ringing. The callhistory still shows ringing and conected to GV, but the other party's phone does not ring.

I tried your method. Exacty as per your example with the following changes

User Defined DigitMap "cot"
Display Label> cot
DigitMap> 'maria'

Instead of  "sip:my.ddns.com:5070"  in Proxy URI, I have used sip:212.21.37.49:5060 this is the external address of my router where I have forwarded 5060 to 5061 to the OBI internal address 192.168.1.20.
The UserAgentPort of sp1 is 5060

When I try to dial I get "404/Not found" in the CSip call in progress screen.
The port forwarding schema seems to work with sp2 (5061) but not with sp1 (5060) since call history does not show any call thru sp1.


Title: Re: Using CSipSimple With OBi
Post by: ianobi on September 13, 2013, 08:26:06 AM
QuoteUser Defined DigitMap "cot"
Display Label> cot
DigitMap> 'maria'

The DigitMap should be in parentheses like so:
DigitMap> ('maria')


Quotein Proxy URI, I have used sip:212.21.37.49:5060 this is the external address of my router where I have forwarded 5060 to 5061

This does not need to be so complicated. In Proxy URI simply use 212.21.37.49:5061. Your router will then direct calls from CSipSimple to OBi sp2 InboundCallRoute. This will then direct the calls to use GV on sp1:

Voice Services > SP2 Service > X_InboundCallRoute:
((Mcot)>(xx.):sp1)

Or this may work better for you:

Voice Services > SP2 Service > X_InboundCallRoute:
{('maria'):sp1}

For this configuration to work there must be a registered sip service on sp2 for the direct ip calling from CSipSimple to "piggy-back" off. It can be any SIP voip provider (not GV). You could use a free one such as sip2sip.
Title: Re: Using CSipSimple With OBi
Post by: lguerra10 on September 15, 2013, 11:18:18 AM
Thanks for the help, we are getting close

When I apply what you suggested the call is directed to the phone connected to the OBI110 and the phone rings

Voice Services > SP2 Service > X_InboundCallRoute:
{('maria'):sp1}

For this configuration to work there must be a registered sip service on sp2 for the direct ip calling from CSipSimple to "piggy-back" off. It can be any SIP voip provider (not GV). You could use a free one such as sip2sip.

May be I need to modify the SP1  X_InboundCallRoute but I do not know how.

If with your help we succeed we will post the solution to the foum

Here you have the history
Call 1   01/02/2010    01:00:09   

Terminal ID   SP2   PHONE1
Peer Name   Mariatweidner   
Peer Number   maria   
Direction   Inbound   Inbound
01:00:09   Ringing   
20:12:42   End Call   
Title: Re: Using CSipSimple With OBi
Post by: lguerra10 on September 15, 2013, 11:41:13 AM
Hi again

I modified my SP1 route
my SP1 X_Inbound Call Route is

{pp(ob290367476),ph},{(Mcot)>(Msp1),(Mcot)>(<**1:>(Msp1)):sp1},{(Mcot)>(<**2:>(Msp2)):sp2},{(Mcot)>(<**8:>(Mli)):li},{(Mcot)>(<**9:>(Mpp)):pp},{(Mcot)>**0:aa},{(Mcot)>0:ph}

with this I get the following history

Call 1   09/15/2013    20:30:57   

Terminal ID   SP2   GoogleVoice1
Peer Name   Mariatweidner   
Peer Number   maria   7145613070
Direction         Inbound   Outbound
20:30:57   Ringing   
20:31:06   End Call

It looks as if the call goes to GoogleVoice, but ... the CSIp client does not ring and the call times out without ringing at the other side. I am at the ppoint where I started last week. The call seem to go to GV but things do not work.


Title: Re: Using CSipSimple With OBi
Post by: lguerra10 on September 15, 2013, 12:08:10 PM
YES!!! Problem solved. Things with CsipSimple work great

Thanks especially to ianobi and to azrobert for their ideas and help. This has to be the simplest way to make Csip work if you have admin access to the router in your LAN


The quality of the call both with WIFI and Data is perfect

the solution works as follows

1. In the router forward all the required ports at the WAN to the OBI inside the LAN

   1   OBI   5060 ~ 5062   5060 ~ 5062   UDP   192.168.1.11   
   2   OBI-1   10000 ~ 11000   10000 ~ 11000   UDP   192.168.1.11   
   3   OBI-2   16600 ~ 16998   16600 ~ 16998   UDP   192.168.1.11   
   4   OBI-3   19305   19305   UDP   192.168.1.11   
   5   OBI-4   5222 ~ 5223   5222 ~ 5223   TCP   192.168.1.11   
   6   OBI-5   6800   6800   TCP/UDP   192.168.1.11
   
2. SP2 X_InboundCallRoute
{('pgonzalezg'):a},{('maria'):sp1)} ,{ph}

3. SP1 X_InboundCallRoute
{pp(ob290367476),ph},{(Mcot)>(Msp1),(Mcot)>(<**1:>(Msp1)):sp1},{(Mcot)>(<**2:>(Msp2)):sp2},{(Mcot)>(<**8:>(Mli)):li},{(Mcot)>(<**9:>(Mpp)):pp},{(Mcot)>**0:aa},{('luis'):sp1},{(Mcot)>0:ph}

The SP2 has a SIP service associated with it to receive calls

The settings at the CSIP client have been explained in this same thread by azrobert.
Title: Re: Using CSipSimple With OBi
Post by: lguerra10 on September 16, 2013, 09:49:28 AM
Further notes on CSIP battery usage
CSIP uses by defaul UDP transport. With this setting and always on (to receive calls) the program was using battery in my Jiayu GS2 (3000 mWh battery) at a pace of over 8% per hour.
I changed the setting "Transport" to TCP in the Account-Edit. This reduced the usage to below 3% per hour.
The quality of the calls is perfect with UDP or TCP, both over WIFI or Data.
Good luck
Title: Re: Using CSipSimple With OBi
Post by: Texas on October 30, 2013, 01:13:47 PM
A MUCH BETTER SOLUTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Easier Too ! This is so simple a baby can do this.

Ok. I tried and tried and tried to use the ObiTALK Android app and it SUCKS! (Apple app work ok). So, here is the good news!

I have an OBi100:

- SP1 = GoogleVoice
- SP2 = Callcentric SIP (100% FREE! Free callcentric number and FREE USA DID)
- Auto Attendant turned ON with default values

OBJECTIVE: If specific callcentric users OR anyone (your choice) calls our callcentric number which comes in on SP2 they get our Auto Attendant and can make a free USA phone call.
 
SOLUTION:
IF you put under Voice Services, SP2 Service, X_InboundCallRoute={1777xxxxxxx|1777xxxxxxx>:aa},{ph}    THEN the specified 1777xxxxxxx number/s goes to AA and your DONE !!!!! All other calls rings our phone. AA takes over and completes the call as desired. OBiTALK NOT USED OR ENABLED. OBi services on their web site NOT USED. EVERYTHING CONTROLLED BY YOUR OBi device.

Using cSIPsimple app works PERFECTLY on ALL Android and Apple devices. THE CALLS ARE ALWAYS 100% FREE. No DID number needed. Anyone in the entire world can call your OBi device and make free USA phone calls.

GREAT STUFF !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 

PS. Other SIP apps like Media5 phone (use to be my favorite but no more) and 3CX and many others have serious problems (especially the android apps). The call completes and voice works but is disconnected after a few seconds. MUST USE cSIPsimple !
Title: Re: Using CSipSimple With OBi
Post by: Usetheforceobiwan on November 09, 2013, 06:01:31 PM
I really want to try this method but have reservations from a security perspective as far as inbound dialing from Csipsimple to the Obi.  

If I am reading this thread (and several of the others) correctly - and I have read them over and over again - the only security with the sip to sip (not to be confused with sip2sip) connection is by the userid that is passed through the LAN or internet connection to the listening port on the Obi box.  In other words, the Csipsimple app establishes a connection with your routers public IP address which uses the open port (5060 or whatever corresponds to the appropriate Spx you are communicating with) to act as a pass through to the Obi box.  Once this connection is established, your Obi box checks the userid of the inbound communication stream and if it matches,  permits access to the specific Spx for you to make your call through the Obi box to other trunks.

My security concern is if someone else tried to make the same connection to your Obi box using the same sip to sip method, could they make calls through your Obi box if they used the same userid that you had established?  Also, is this method vulnerable to port scanning and other malicious hacking exploits?

If the security possible by the sip to sip connection is too weak, are there any merits to putting the Obi box behind a VPN?  I have read elsewhere of others using Android's built in VPN client to establish connections to a VOIP provider or server.

I am hoping other more knowledgeable forum members can share their thoughts on this subject.
Title: Re: Using CSipSimple With OBi
Post by: ianobi on November 10, 2013, 05:23:39 AM
Security is always an issue worth considering. Looking at InboundCallRoutes we have three parts that we can use:

Caller>callee:terminal

If we look at the "Direct Calling" method of using CSipSimple described here, then we can see a typical InboundCallRoute:

http://www.obitalk.com/forum/index.php?topic=6211.msg39466#msg39466

Voice Services > SP1 Service > X_InboundCallRoute (typical example):
{(Mcot)>(Msp1),(Mcot)>(<**1:>(Msp1)):sp1},{(Mcot)>(<**2:>(Msp2)):sp2},{(Mcot)>(<**8:>(Mli)):li},{(Mcot)>(<**9:>(Mpp)):pp},{(Mcot)>**0:aa},{(Mcot)>0:ph},{>1787856:ph}

Mcot contains the list of allowed CallerIDs. These can be quite complex made up of numbers, lower and upper case letters (beware of "reserved characters"). The OBi is case sensitive whan it deals with CallerIDs. For example you might have a CallerID of 62Hf17nN4kd3. Hackers and scanners are not easily going to break that sort of CallerID. I'm not sure how many characters long a CallerID can be, but long enough for our purposes!

Callee is used differently. The last rule above {>1787856:ph} is a typical use of the "Oleg Method". An incoming service or DID is allowed to call the target (phone in this case) if they are using the correct callee. The callee in this case might be your phone number or SIP identity. In this case callers only get access to ring your phone, no through dialling is allowed.

Callee in a more complex rule above such as {(Mcot)>(<**2:>(Msp2)):sp2} is (<**2:>(Msp2)). In this case the number dialled has to begin with **2 and match the DigitMap Msp2. We use **2 to make it the same as dialling from the phone attached to the OBi. However, if you wished to make things more difficult for hackers, you could use any combination such as (<**2*8:>(Msp2)). The problem here is that you are making things difficult for yourself! You could be extra clever and use CSipSimple's filters to add these odd codes for you.

Next we have terminal. Not much you can do here, although a blank terminal can be used to send unwanted callers to the "bit bucket" as in this rule:
{(?|x|xx|xxx|xxxx|xxxxx|xxxxxx|un@@.|anon@@.):}
This will ban calls with no Peer Number, any Peer Number less than seven digits, Peer Number "unknown" and Peer Number "anonymous".

Finally we have the SIP "listening ports". The OBi knows them as UserAgentPorts. I recommend always changing them to something obscure well away from 5060, 5061 etc. It's not a sure way to stop scanners, but it's another level of security to add to the others.

I've been using CSipSimple for direct calling into my OBi for quite a while and have had no hacker / scanner problems. I do use most of the methods described above.

May the OBi force be with you   :)
Title: Re: Using CSipSimple With OBi
Post by: Usetheforceobiwan on November 10, 2013, 07:18:34 AM
May the force with you too ianobi  :o  And thanks for your reply.

OK, so if I am reading this correctly, the security is provided by four factors - IP address, UserAgentPort, Caller ID and the dialing instructions.  
That is, for a SIP connection / call to made to and through your OBi box, the only way the connection can result in a call being made through one of your trunks is if all of the following conditions are met:

1)  The connection attempt goes to the correct IP address whether it's a public IP or DNS / NAT.
2)  The connection uses the proper UserAgentPort corresponding to the Spx you are using for the relay.  Your router has to have this port open.
3)  The CallerID matches a string in the COT (circle of trust) you create.
4)  The dialing instructions included in this connection's call setup have the proper prefix that matches the routing instructions in your InboundCallRoute.

Looking at these conditions for call placement, I see where it would be  fairly difficult to get all four factors correct at the same time.  I mean IP and port are more easily obtained but also having the correct CallerID and dialing instructions are not.  
Title: Re: Using CSipSimple With OBi
Post by: ianobi on November 11, 2013, 01:17:42 AM
Yes, you are correct about the four factors with regard to single-stage through dialling.

I keep my prefixes (**1, **2 etc) as standard because I use the same InboundCallRoute for CSipSimple, softphones and another OBi. If you only use the InboundCallRoute for CSipSimple, then you could use its filters to add quite complex prefixes and have OBi remove them before dialling.

"cot" is simply a User Defined Digit Map. You can put the CallerIDs directly in the InboundCallRoute rules, but that makes the rules long and complex. Also using "cot" means that you only have one place to make any changes.
Title: Re: Using CSipSimple With OBi
Post by: medscy on April 20, 2014, 12:58:22 AM
Hello,

I have tried the direct method posted here.. It worked like a charm on my home network....but failed the moment I go on 4G network or from other wifi network.

I realise that the ACK messages from CSIPSimple never reaches my router on the Internet.... As a result, I can only hear audio from my CSipSimple client to my home phone via Obi...but there is no return audio from Obi back onto CSIPSimple....

Below is the SIP trace on my CSIPSimple client. Note that the "Contact" field contains the private address of my OBI... my guess is that the ACK message got sent to the private address which got lost on the Internet..... that explains why it works for my wifi but not on 4G.... Anyone has any suggestion how to alter that field?

8.8.8.100:1234:
SIP/2.0 200 OK
Call-ID: TtDF7xJN7uvUo-1c3X88BrYVHVJRCbZR
CSeq: 7423 INVITE
Content-Length: 359
From: "test" <sip:test@127.0.0.1>;tag=0nt0zDKLhbNrMH8k0i8mkuQAIP3wFzfa
To: <sip:**0@me.dyndns.org>;tag=SP1243eb3644ac3da40
Via: SIP/2.0/UDP 118.61.22.18:33639;branch=z9hG4bKPjKjIQPqxT0.U2ZobtCY.yz71ZkexApIEY;received=118.61.22.18;rport=33639
Server: OBIHAI/OBi110-1.3.0.2824
Contact: <sip:obi110@192.168.1.100:5060>
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Type: application/sdp

v=0
o=- 544003 1 IN IP4 8.8.8.100
s=-
c=IN IP4 8.8.8.100
t=0 0
m=audio 16602 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=ptime:20
a=xg726bitorder:big-endian
a=candidate:1 1 UDP 2113929216 192.168.1.100 16602 typ host
a=candidate:2 1 UDP 2097152000 8.8.8.100 16602 typ srflx


Title: Re: Using CSipSimple With OBi
Post by: ianobi on April 20, 2014, 02:43:28 AM
medscy,

This is a common problem using an OBi with peer to peer type configurations. The problem it to get the OBi to declare its external ip address rather than its internal ip address. Did you try this method:

http://www.obitalk.com/forum/index.php?topic=6211.msg39466#msg39466

It piggy-backs on an existing registered SIP account. This forces the OBi to use its external ip address.

The other way if you have a fixed external ip address is to change these settings:

Service Providers -> ITSP Profile X -> SIP -> X_DiscoverPublicAddress: Unchecked
Service Providers -> ITSP Profile X -> SIP -> X_PublicIPAddress: Insert your public IP address

There's quite a few posts regarding this problem. Look for posts by hwittenb and azrobert.

My setup just now has two accounts. I use the direct method to effectively use my cell phone as a wifi phone around the home. I use the indirect method via sip2sip to call into my obi from anywhere in the world. If using 3g, then its well worth buying the G729 codec for CSipSimple.

Title: Re: Using CSipSimple With OBi
Post by: medscy on April 21, 2014, 07:20:24 AM
Ianobi, thanks for taking time to respond to me... Appreciate it.

I tried the piggy back method but it did not work for me... The only difference was that I set the inbound route to phone port only without the sophiscated digimap involving mcot. Is that material?

In any case, I got it working but explicitly specifying the external address in the x-public address field... but still, I find it strange why when obi actually successfully identify my external ip via stun/ice, it still insists on using internal addresss....
Title: Re: Using CSipSimple With OBi
Post by: ianobi on April 21, 2014, 10:38:39 AM
QuoteI tried the piggy back method but it did not work for me... The only difference was that I set the inbound route to phone port only without the sophiscated digimap involving mcot. Is that material?

Not material - all calls should have been routed to the phone port. There are quite a few variables here; wifi/4G/3G all seem to behave differently (I find wifi always works); routers behave differently; CSipSimple sometimes behaves differently with different smart phones (see website).

I found one cure using the piggy back method was to instigate symmetric RTP on the relevant OBi ITSP Profile. Then that might not be good for the voip provider that you are piggy backing on.

QuoteIn any case, I got it working but explicitly specifying the external address in the x-public address field... but still, I find it strange why when obi actually successfully identify my external ip via stun/ice, it still insists on using internal addresss....

Phrases like "Obis suck at peer to peer configurations" have appeared more than once in this forum   ;)  I don't think that Obihai ever intended peer to peer use, but it would be a very simple matter to have an easy switch for internal or external ip address.

I accepted the compromise of using the indirect method via sip2sip. It means that the account can stay registered and you can receive calls via CSipSimple as well as making outgoing calls.