News:

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

Main Menu

CSipSimple: 404 / User not found

Started by threehappypenguins, June 29, 2015, 01:40:05 PM

Previous topic - Next topic

threehappypenguins

I have successfully set things up on my Obi202 so that all my calls also ring my Android phone with CSipSimple and a Sip2Sip account... although my only complaint is that the CallerID always shows my Sip2Sip username and not the actual caller... I tried enabling X_SpoofCallerID and it effectively stops my Android from receiving the calls after that; whether I have registration enabled or not.

Anyways, I cannot, for the life of me, make outgoing calls from CSipSimple. I have done this in the past, can't get it to work now. Here is what I did:

Voice Service > SP2 Service > X_InboundCallRoute:

Quote{(Mcot)>(<**7**1:>(Msp1)),(Mcot)>(<**1:>(Msp1)):sp1},{(Mcot)>(<**7**2:>(Msp2)),(Mcot)>(<**2:>(Msp2)):sp2},{(Mcot)>(<**7**3:>(Msp3)),(Mcot)>(<**3:>(Msp3)):sp3},{(Mcot)>(<**7**4:>(Msp4)),(Mcot)>(<**4:>(Msp4)):sp4},{(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,ph2},{ph,ph2}

SP1 is my default. SP2 (obviously) is where I want to receive the calls from the Android in order to use SP1 (one voip service) and SP3 (another voip service).

User Settings > User Defined DigitMaps > User Defined Digit Map2 > Label:

cot

User Settings > User Defined DigitMaps > User Defined Digit Map2 > DigitMap:

(aaaaaa's')

(Where aaaaaa's' is my username... which ends in an s... and apparently s is a used character).

In CSipSimple, my Sip2Sip account is successfully registered. I have the STUN server enabled, and in order to add a prefix and suffix:

Settings > Filters > Sip2Sip > Add Filter / rewrite rule
Changed Can't Call to Rewrite
Changed Starts with to All
Changed Replace match by to Prefix by (and then Suffix with when making the separate suffix rule)

I added **7 as a prefix and @username.no-ip.org:5081 (my X_UserAgentPort for SP2 is 5081... which I also forwarded on my router). My public ip address is also updated with my ddns, and I also have X_DiscoverPublicAddress in Profile B SIP).

Yet, when I dial out, no matter what I dial, I right away get the error "404 / User not found." And nothing shows up in my Obi history.

It seems like the call isn't even attempting to go out on CSipSimple... not even for the Obi to reject it or something. Any ideas?

In case anybody is wondering, I went through all this a couple of years ago: https://www.obitalk.com/forum/index.php?topic=4682.0

azrobert

The 404 error is probably coming from Sip2Sip. Look at the Sip2Sip log. Maybe that will give an indication of what's wrong. Are you using the Android dialer or the CSipSimple dialer? Using the CSipSimple dialer can cause the 404 error. CSipSimple filters only work with the Android dialer.

What is defined on SP2 and what is your rule that routes calls to the Android?
Try using SP3 if it's defined as SIP.
Enable X_SpoofCallerID on SP3.
Then use the following rule to route inbound calls to the Android:
sp3(Your_Sip2Sip_ID@sip2sip.info)

You should simplify the SP2 X_InboundCallRoute. ianobi allowed for every possible combination.
Something like:
{aaaaaas>0:ph,ph2},{aaaaaas>(Msp1):sp1},{aaaaaas>(<**3:>(Msp3)):sp3},{ph,ph2}

Then remove the **7 prefix from the CSipSimple filter. It's not needed.
When the aaaaaas rule is not enclosed in parentheses it becomes a literal and the "s" doesn't have to be in quotes.

threehappypenguins

#2
Still not working.

Since sip2sip won't allow me to have the ;ui=$1 at the end in order to display the caller, and because I thought that maybe sip2sip just wouldn't let me do outbound calls on my cell to my Obi anymore, I figured I'd try Callcentric.

I registered that on CSipSimple just fine, *did not put on* the prefix of **7, and put on a suffix of @host.ddns.com:5081

I can successfully receive calls by putting the following in SP1 & SP3:

Quote{(Mcot)>(Msp1),(Mcot)>(<**1:>(Msp1)):sp1},{(Mcot)>(<**3:>(Msp2)):sp3},{(Mcot)>(<**8:>(Mli)):li},{(Mcot)>(<**9:>(Mpp)):pp},{(Mcot)>**0:aa},{(Mcot)>0:ph},{sp2(17771234567@in.callcentric.com;ui=$1),ph,ph2}

I'm not really sure why I have all the Mcot stuff all in there, but I just left it because it's working. I also originally registered CallCentric on SP2, but then decided to uncheck the register thing and not require it. Calls still go to my cell (and ring home phones simultaneously).

I tried what you implemented and put into SP2 this (and enabled X_SpoofCallerID for SP3):

Quote{17771234567>0:ph,ph2},{17771234567>(Msp1):sp1},{17771234567>(<**3:>(Msp3)):sp3},{ph,ph2}

Didn't work.
I also tried this:

Quote{17771234567>0:ph,ph2},{17771234567>(Msp1):sp1},{17771234567>(<**2:>(Msp2)):sp2},{ph,ph2}

If I use the CSipSimple dialer, it says, "number is invalid." If I use the native android dialer and then choose CallCentric, it says 486 / Busy here.

I tried the "old" way with the prefix of **7 and that big long list of Mcot that ianobi gave me. Exact same errors.

I just can't get this thing working!!!

azrobert

I think you have a misunderstanding of how this works.
You register the Android to Sip2Sip.
The filter is applied to the Sip2Sip account.
Dial the number from the Android dialer and select the Sip2Sip account.
A Callcentric definition is not needed on the Android for this function.
If you need a CC definition for some other reason, that's fine.

Sip2Sip will route the call to the URI setup in the CSipSimple filter.
The call will go directly from Sip2Sip to the OBi.
Callcentric is not involved.
The call will have your Sip2Sip account number associated with it, not CC's account.
Define SP2 X_InboundCallRoute: {aaaaaa>0:ph,ph2},{aaaaaa>(Msp1):sp1},{aaaaaa>(<**3:>(Msp3)):sp3},{ph,ph2}

Where aaaaaa is your Sip2Sip account number.
The above rules only have to be defined on SP2.
You can remove them from SP1 and SP3.

Route inbound calls  by place the following in the SP1 and SP2 inbound routes:
sp2(aaaaaa@sip2sip.info)

aaaaaa is your Sip2Sip account number.
Also enable X_SpoofCallerID on SP2

You can use this without X_SpoofCallerID enabled, but you won't get CallerID Name:
sp2(aaaaaa@sip2sip.info;ui=$1)

If you want, you can route these calls to in.callcentric.com

threehappypenguins

I completely did away with Sip2Sip, and redid everything with CallCentric. So rather than having Sip2Sip, I have CallCentric instead. Sip2Sip does not let me have ;ui=$1 at the end of the address thingy (whatever it's called). CallCentric does. Also, as soon as I enable X_SpoofCallerID on SP2 when using Sip2Sip, I stop receiving calls on my Android cell. I have no such problem with CallCentric.

I also tried what you said with Sip2Sip originally (my username being aaaaas, or whatever). Won't work. That's when I decided to do away with Sip2Sip completely and try CallCentric on my Android instead.

threehappypenguins

#5
I went back to CSipSimple, deactivated CallCentric, reactivated Sip2Sip, changed SP2 X_InboundCallRoute to

QuoteX_InboundCallRoute: {aaaaas>0:ph,ph2},{aaaaas>(Msp1):sp1},{aaaaas>(<**3:>(Msp3)):sp3},{ph,ph2}

Didn't work. In CSipSimple, I got the error 404/ User not found. In the native dialer, I got 404 / Not Found.

Went back to SP2 X_InboundCallRoute and changed it to

QuoteX_InboundCallRoute: {aaaaa's'>0:ph,ph2},{aaaaa's'>(Msp1):sp1},{aaaaa's'>(<**3:>(Msp3)):sp3},{ph,ph2}

Didn't make a difference. I understand that if I'm registered to Sip2Sip in CSipSimple, I need the Obi to accept my username as an accepted caller. If I'm registered to CallCentric in CSipSimple, the same principle applies... tell the Obi that my CallCentric username (the 17771234567 as the username) is an accepted caller. No go. I've never even gotten it to show up in the Obi and reject it or something. It's like it never leaves CSipSimple. Ever.

A couple of questions... should I have SP2 as a registered SIP provider? Or can it be unregistered? Also, do I need to have the @host.ddns.com:5082 (5081 is my useragentport for SP2, 5080 for SP1, 5082 for SP3). So when I change

Quote<**3:>(Msp3)):sp3}
to
Quote<**2:>(Msp2)):sp2}
or SP1, I make sure to change the port at the end of the @host.ddns.com accordingly... still get the same issues. I also have ports 5080-5083 open in my router.

azrobert

Routing inbound calls to your Android using Callcentric will work, but outbound calls will NOT work. When you send "18005551212@username.no-ip.org:5081" to Sip2Sip it will route the call to that URI address. I never tried it, but when you do the same for Callcentric, I think it will be treated as an invalid outbound number.

You can try the following. It doesn't use another service. The call goes directly from your cell to the OBi202. It doesn't use filters, so you can use the CSipSimple dialer. This works for me from WiFi hotspots. I don't have a data plan on my Android, so I did not test it on a cell network. You might have audio problems on a cell network.

CSipSimple Setup:
Add a new account.
Select the BASIC wizard
Account name = OBi202
User = OBi202
Server = username.no-ip.org:5081
Password = password  (it requires a PW, use 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

OBi Setup:
Service Providers -> ITSP Profile B -> General -> X_SymmetricRTPEnable: Checked

Define SP2 X_InboundCallRoute: {OBi202>0:ph,ph2},{OBi202>(Msp1):sp1},{OBi202>(<**3:>(Msp3)):sp3},{ph,ph2}

azrobert

I think 404 error indicates you didn't setup the filter correctly. I looked at what you did and it looks correct.  Did you apply the filter to the correct account?

If you dial a number like 8005551212 without the filter, Sip2Sip will try to route the call to Sip2Sip user 8005551212 and you will get the not found error.

When you route the calls to port 5081 the rules must be placed in the SP2 inbound route. They are not needed anywhere else.

You could route the calls to port 5082 then the rules must be placed in the SP3 inbound route.

In your router you must port forward the X_UserAgent port to the OBi202's IP address.
You also must route the RTP ports to the OBI202's IP address, otherwise you will have audio problems.  

The RTP ports are found here:
Service Providers -> ITSP Profile B  RTP
LocalPortMin thru LocalPortMax (16800/16998)
That's 199 ports.

You also have to do the port forwarding with the direct dialing method.

azrobert

Log into your Sip2Sip account.
The login userid is userid@sip2sip.info

If you setup the filter correctly the History will show the call as:
18005551212@username.no-ip.org:5081

If you didn't setup the filter correctly the History will show the call as:
18005551212@sip2sip.info

threehappypenguins

Here is what is happening in Sip2Sip:

azrobert

It looks good.
On my setup I tried an invalid port number then an invalid DDNS name.
I got errors, but not 404.
I don't know what else could be wrong.

You are using 5082 which I assume is SP3, but again this wouldn't cause the 404.

Can you try the direct dialing method as posted above?

threehappypenguins

If I use 5082, then I route it to SP3.
If I use 5081, then I route it to SP2.
If I use 5080, then I route it to SP1.

No matter which way I choose, the result is the same (404). One interesting thing though is that if I use the CSipSimple dialer, I get 18005551212@sip2sip.info show up in the Sip2Sip logs. But if I use the native Android dialer (and choose Sip2Sip as was set up in CSipSimple), I get what appears to be the proper routing. Could it be a problem with CSipSimple (at least, the way it functions on my phone)? Are there any other Android apps that allow me to add a suffix?

I will take a look at the direct dialing method you posted and get back with my results.

azrobert

Everything looks like it's functioning correctly, except for the 404 error when using the native dialer. You have 2 options when routing calls thru Sip2Sip. Pass it a URI address and Sip2Sip will route the call to that address. This seems to be happening correctly when you use the native dialer, but you get the error. You can pass it a character string and it will assume that string is an account at Sip2Sip and will route the call to character_string@sip2sip.info. This is happening when you use the CSipSimple dialer and is what should happen. You get the 404 error because that account number doesn't exist at Sip2Sip or the person is not signed in (registered).

CSipSimple seems to be acting correctly. I don't know of any other app that will add a suffix.

You said:
QuoteI also have X_DiscoverPublicAddress in Profile B SIP
X_DiscoverPublicAddress should be at the default of Checked.
SP2 should be registered to the service provider.
If these were set wrong, it should NOT cause the 404 error.

It seems like the problem is with Sip2Sip, but it works for me.
Here are some wild guesses you can try:
Try a different account at Sip2Sip
Try using your public IP address in the CSipSimple filter instead of a DDNS name.

threehappypenguins

Sorry about taking so long to respond. I haven't had a chance to sit down and do this again until now.

Okay, I registered SP2, and now I'm getting 408 request time-out. I tried multiple Sip2Sip accounts, including one where they generate me my username (it's a bunch of numbers), and it does the same thing. I tried my IP address (not the ddns), and it didn't make a difference either.

Here's something strange. If I put the Obi into DMZ in my router, then I started getting the 404 error again. So I took it back out of DMZ and continue to forward the proper ports. I continued to get the 404 error until I rebooted my router. Now it's back to 408 request time-out.

I attached a picture again if you wanted to look. Also, I expanded some of the error numbers, and this is what I got for each one (with public IP and other addresses changed for privacy, of course):

SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 99.99.999.999:5060;received=99.99.999.999;rport=5060;branch=z9hG4bKPjNaEE5RoL0FsFMBY3piQupk8gMgPVj4nO
From: <sip:1234567890@sip2sip.info>;tag=0u-hr2X2ONVklIb8-D8ZFvrEIRrYSWdt
To: <sip:5555555555@username.no-ip.org>;tag=f2f36c970cbb772c79daadc5c9d6e415.7177
Call-ID: rzHUbgEkxTkDCIgd1SANDjRPhILIDayc
CSeq: 23573 INVITE
Proxy-Authenticate: Digest realm="sip2sip.info", nonce="559af4b20202eee77e431769ab62c9d966e1f1bb"
Server: SIP Thor on OpenSIPS XS 1.9.0
Content-Length: 0

SIP/2.0 100 Trying
Via: SIP/2.0/UDP 99.99.999.999:5060;received=99.99.999.999;rport=5060;branch=z9hG4bKPjtU4ezn.nRl0g23gprsp3N4bGr8RhEvD4
From: <sip:1234567890@sip2sip.info>;tag=0u-hr2X2ONVklIb8-D8ZFvrEIRrYSWdt
To: <sip:5555555555@username.no-ip.org>
Call-ID: rzHUbgEkxTkDCIgd1SANDjRPhILIDayc
CSeq: 23574 INVITE
Server: SIP Thor on OpenSIPS XS 1.9.0
Content-Length: 0

SIP/2.0 408 Request Timeout
Via: SIP/2.0/UDP 99.99.999.999:5060;received=99.99.999.999;rport=5060;branch=z9hG4bKPjtU4ezn.nRl0g23gprsp3N4bGr8RhEvD4
From: <sip:1234567890@sip2sip.info>;tag=0u-hr2X2ONVklIb8-D8ZFvrEIRrYSWdt
To: <sip:5555555555@username.no-ip.org>;tag=104fb72fe3a4f8dc6b8eaad6b52e574f-90f5
Call-ID: rzHUbgEkxTkDCIgd1SANDjRPhILIDayc
CSeq: 23574 INVITE
Server: SIP Thor on OpenSIPS XS 1.9.0
Content-Length: 0

Unless you see something that I'm missing, I'll try the other setting suggestions you made and post my results. I can't tonight, but hopefully tomorrow.

azrobert

Error 408 is new for you and I was able to reproduce it on my setup.
Are you port forwarding 5082 to the IP address of the OBi202?
Did you change the port number correctly?
Voice Services -> SP3 Service -> X_UserAgentPort: 5082

threehappypenguins

That's what's so weird. Voice Services -> SP3 Service -> X_UserAgentPort  is definitely, definitely, definitely 5082. Here is a screenshot from my router. I am running Shibby's Tomato firmware.

azrobert

I reproduced the 408 error by either turning off port forwarding or port forwarding the wrong port#. I assume routing the call to the wrong IP address will produce the same error. I know it's a long shot, but did you use your public IP address instead of DDNS?

Is the OBI202 setup as a router or in bridge mode?

threehappypenguins

Under the "Router Configuration" settings, I've never touched anything. So whatever the default settings are. It looks like the default is router, and the only choices is router or bridge.

My Linksys router assigns all the DHCP addresses... I don't really know how to configure the Obi any other way.

In LAN settings > CurrentRouterIPAddress the ip address there is 192.168.10.1

I see DHCP Server Settings, it's checked to Enable (by default). Why does the Obi have this capability? What devices would it be assigning DHCP addresses? I see it also has its own port forwarding section, etc. What is this for? I thought I'm supposed to do all the port forwarding in my router?

I have used both my public IP address and the DDNS and either way, it's the same error.

azrobert

#18
I don't own an OBi202, so I'm not sure how to configure it.
I have configured a 2nd router with an OBi attached to it.
With this setup you have 2 networks with 2 different sub-net addresses and 2 DHCPs.
The primary router will assign an address to the secondary router.
This is a similar concept as a provider assigning a public IP address to your modem.
If the primary router's sub-net is 192.168.1 then it will assign an address like 192.168.1.100 to the secondary router.
If the secondary router has a sub-net 192.168.10 then it will assign an address like 192.168.10.50 to the attached OBi.

Port Forwarding:
The primary router port forwards 5082 to 192.168.1.100
The secondary router port forwards 5082 to 192.168.10.50

If the OBi202 has separate addresses for the router and ATA will explain why you are getting the timeouts. Maybe the easiest way to fix the problem is to use bridge mode. This way you are running a single network and 1 DHCP.

threehappypenguins

I forgot to mention. When I had this working a long time ago, I had a modem/router combo. Now that I have a cheapie ISP, they gave me a modem (which is also a non-wireless router) that automatically bridges itself. Here is what my network looks like:

Modem: 192.168.100.1
Linksys Router > plugged into modem: 192.168.1.1
-Linksys router assigns all DHCP; for example, Obi is 192.168.1.19, my laptop is 192.168.1.5, my Android is 192.168.1.17, etc

So... if I put the Obi in bridge mode, then it acts as a client only, and not a router? What happens when I do this? Can I easily take it out of bridge mode, or do I lose access to the web interface? (ie, logging in via my browser by typing in 192.168.1.19)

I'm not sure what you mean by "If the OBi202 has separate addresses for the router and ATA." I thought my Obi202 IS an ATA? Also, it is not directly plugged into my router via ethernet. I have the wifi dongle plugged in it, so it's connected by Wi-Fi.