Can't Register Zoiper Android

phones
Tags: #<Tag:0x00007f7022b80ee0>

(Kirk Bocek) #1

I’m trying to connect a Zoiper Android instance to FreePBX. After creating the extension and secret in FreePBX and then configuring Zoiper I see in the logs:

[2017-05-30 17:00:11] SECURITY[1534] res_security_log.c: SecurityEvent="ChallengeSent",EventTV="2017-05-30T17:00:11.045-0700",Severity="Informational",Service="SIP",EventVersion="1",AccountID="101",SessionID="0x70768cd0",LocalAddress="IPV4/UDP/10.0.2.28/5060",RemoteAddress="IPV4/UDP/10.0.2.126/43918",Challenge="2fecbbe4"

Which is the cell phone. But Zoiper continues to give

Registration Failed (Request Timeout (408))

I installed also the Windows software – that connected just fine on another extension.

Any ideas.


#2

chan_sip or pj_sip?


(Kirk Bocek) #3

Chan_sip just like the extension for the Windows client


#4

means that your phone cannot reach the server, so are you using wifi in the same network segment? If using WAN did you allowed the ip addres in the permit section and in your firewall?


(Avayax) #5

Unless you have your cell phone on WiFi being on the same network as your PBX, you need to allow sip traffic UDP port 5060 through your firewall, otherwise your registration attempts from Zoiper will be denied on your firewall.

Forwarding traffic udp port 5060 to your pbx from ANY IP address is dangerous, so it’s usually restricted to known IP addresses, which isn’t really practical with cell phones, cause their IP address changes all the time.
So you can use a dynamic DNS client and allow the hostname, or use the responsive firewall or use sip URIs.


(Kirk Bocek) #6

Yes, this is on the same segment. The phone is reaching the PBX as evidenced by the log entry I shared. Somehow the registration is failing.


#7

actually the security log only show the challenge sent event. You need to provide the sip debug of the original REGISTER sip message.
Register->
<-challenge
Register with response->
<-auth ok


(Kirk Bocek) #8

I’m not seeing a different message in the log. Only the one I provided repeated many times.

Now the Zoiper Windows client registers just fine:

SecurityEvent="SuccessfulAuth",EventTV="2017-05-31T09:21:14.891-0700",Severity="Informational",Service="SIP",EventVersion="1",AccountID="20",SessionID="0x70a05308",LocalAddress="IPV4/UDP/10.0.2.28/5060",RemoteAddress="IPV4/UDP/10.0.2.1/43391",UsingPassword="1"


#9

That’s the security log. We want to see the Asterisk log.


#10

Also try to switch wifi off on the cell to see if that works.


(Kirk Bocek) #11

Setting the log display to freepbx.log instead of “full” I don’t see anything about extensions being registered. I’ve also searched the logs from the command line. Still not seeing anything.


(Avayax) #12

Sip set debug on

Do you see any sip packets coming in from the Zoiper client?


(Kirk Bocek) #13

Yes, the registration is being attempted as the log entries attest. The user/extension number is correct for both the Windows and Android clients.


#14

We need to see the sip debug not the security log. Run:

then

Then try to register with your Zoiper, when it timeouts CTRL+C in the asterisk cli and finally upload the sipdebug.txt


(Kirk Bocek) #15

So I see from the cell phone:

<--- SIP read from UDP:10.0.2.126:43918 --->
REGISTER sip:raspbx.pvt;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 10.0.2.126:43918;branch=z9hG4bK-524287-1---0f194f4c931e5f73;rport
Max-Forwards: 70
Contact: <sip:101@10.0.2.126:43918;rinstance=40ffcc96daf919c8;transport=UDP>
To: <sip:101@raspbx.pvt;transport=UDP>
From: <sip:101@raspbx.pvt;transport=UDP>;tag=8c600057
Call-ID: 6FCB4fRUTclzg2K5ZveT6Q..
CSeq: 2 REGISTER
Expires: 60
User-Agent: Zoiper rv2.8.30
Allow-Events: presence, kpml, talk
Content-Length: 0

And the response from FreePBX:

<--- Transmitting (no NAT) to 10.0.2.126:43918 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.0.2.126:43918;branch=z9hG4bK-524287-1---0f194f4c931e5f73;received=10.0.2.126;rport=43918
From: <sip:101@raspbx.pvt;transport=UDP>;tag=8c600057
To: <sip:101@raspbx.pvt;transport=UDP>;tag=as6d063a23
Call-ID: 6FCB4fRUTclzg2K5ZveT6Q..
CSeq: 2 REGISTER
Server: FPBX-13.0.191.11(13.15.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="3365e4d0"
Content-Length: 0

So clearly an “unauthorized” response. But I have carefully setup and checked the secret in FreePBX and the password in Zoiper.


(Avayax) #16

Your 401 Unauthorized response is the authentication challenge from your server, not necessarily an error.

We need more logs.
What’s coming after that?


(Kirk Bocek) #17

I pulled what I thought relevant from the verbose logging you had me create. I don’t want to post the whole log. What events are you looking for?


(Kirk Bocek) #18

After installing and trying two other soft phones I’m wondering if this isn’t an Android 7 issue.


#19

Zoiper seems to be replying to private address space (10.x.x.x). Is this what you want in your setup? If zoiper is connecting from outside your network you may need to check off the rPort settings in zoiper for signalling and media.


(Kirk Bocek) #20

Yes this is all on my LAN. No NAT or other confusion.