News:

On Tuesday September 6th the forum will be down for maintenance from 9:30 PM to 11:59 PM PDT

Main Menu

Using CSipSimple With OBi

Started by ianobi, November 25, 2012, 03:26:42 AM

Previous topic - Next topic

hwittenb

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

ianobi

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.

cpetro

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!    ;)

QBZappy

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.
Owner of the 1st OBi110/100 units in service in Canada & South America. 1st OBi202 on my street. 1st OBi1032 in Montreal.

ianobi

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.

duzlu_it

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.

jjjooonnn

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.

ianobi

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!

jjjooonnn

#48
@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!

ianobi

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.

azrobert

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)


ianobi

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 ...  :)

azrobert

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.

ianobi

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!

jjjooonnn

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

ianobi

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!


jjjooonnn

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]

azrobert

#57
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

azrobert

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


jjjooonnn

#59
@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?