Internal calls to SIP phone / external IP


#1

Hi. I have a couple of SIP accounts on a couple of android phones. When we internal dial, it rings perfectly fine, but as soon as you answer the call, it immediately hangs up.

I see the IP of my cellphone registered in the firewall under Successfully Registered Endpoints so I don’t think it’s a firewall issue? Anyone have any ideas?

It works fine when on my LAN connection (which is whitelisted), but when on mobile network it doesn’t work…maybe it IS the FreePBX firewall?.. I’m lost.

I can see the OPTIONS method being called and then an OK response…


#2

sngrep will help you diagnose here


#3

@dicko I’m looking at SNGREP… The only weird thing that I can see is that the to and the from are showing as the same SIP extension…

Actually, nope that’s not it… they all do that… OPTIONS
From: 2005
To: 2005

INVITE shows it though… 2001 to 2005…


#4

its not SNGREP its sngrep


#5

I am seeing a 401 unauthorized on the INVITE… I saw somewhere to set the extension as NAT, but I don’t know where to do that… I’ve looked in the extension and don’t see that setting. I also have UDP 0.0.0.0 - All set to yes in the PJSIP settings.


#6

Successful calls will show the INVITE being rejected one time then accepted if you have your auths correct (its a security thing) . If it iss not working , go back to your step 1 and start over because the rubrics are plain and simple.


#7

The 2 different phones are on different networks. I suspect this is the issue, but I don’t know how to fix it. I’m doing my best reading the SNGREP output but can’t see what else it would be.


#8

Lacking the ability to see what you see, I cant help further.


#10

OPTIONS are a rabbit hole less to go down, concentrate on INVITES


#11

Thanks @dicko

So when I make a call from the extension that works it goes:

  • INVITE (SDP)
  • RINGING
  • PRACK
  • 200 OK

In the one that doesn’t work it goes:

  • INVITE (SDP)
  • 401 Unauthorized
  • ACK
  • INVITE (SDP)
  • 100 Trying

#12

Look more fully at the conversation, an initial 401 is expected on an incoming call, the next challenge would be accepted if the AUTH is good.

Check you passwords,ports and used channel driver.


#13

I deleted the SIP account from my phone. I actually thought “maybe Android doesn’t work on PJSIP” so I changed the extension to chan_sip and it still doesn’t work.

I’m not sure what it is, but I’m sure it is a setting somewhere as it is happening on my lab environment and my production environment.

I deleted the SIP account from my phone. I actually thought “maybe Android doesn’t work on PJSIP” so I changed the extension to chan_sip and it still doesn’t work.

I’m not sure what it is, but I’m sure it is a setting somewhere as it is happening on my lab environment and my production environment.

This is only happening to the softphones on my cell and my wife’s cell. I have a home lab with 2 dynamic IPs, and a production lab with a static IP.

I have a phone on 1 internal IP, another on the other internal IP, both connecting to my production server and there are no issues. So both phones are technically on different networks and neither are on the FreePBX network.

So far, I have only seen this with the android softphone client. I will do more testing on a softphone on my computer as well as potentially a 3rd party softphone on my android.


#14

Keep testing, The answer almost always eventually is “I did something dumb”,

Personally I have never done anything dumb , but I await your eventual ‘success’ announcement


(Dave Burgess) #15

… and yet dicko’s the shining example of what happens when you don’t secure your PBX. :slight_smile:

We’ve all done dumb stuff. Some of us do dump stuff all the time. Keep at it - you’ll figure it out.


#16

All my registration now require 2fa over homing pigeon protocol

Since I implemented that rule, not one request to start a nuclear war has been succesful. But those effuckers from Iceland/Holland/Poland are still knocking on the door.


#17

…so it seems like the stock Android integration doesn’t work. I was testing everything else… finally installed some softphone desktop and mobile apps and they work… wtfoof.

Does anyone have any luck with the Android stock dialer with SIP? It doesn’t work on my phone or my wife’s phone but 3rd party apps do.


#18

What is a ‘stock Android integration’? if you are using something commercial, please take it to the appropriate forum


#19

Oh, its the SIP dialer built into the Android platform.


#20

I still would like to know what is going on, but I don’t know how to debug it.


#21

The SIP dialer native to Android, will only use the SIM device (either E or physical) in the phone, many android apps can intercept that behavior and provide , usually electively’ an alternative route, What exact SIP dialer are you using ?