r3gis3r / CSipSimple

CSipSimple Mirror (no pull-requests here)
http://www.csipsimple.com
GNU Lesser General Public License v3.0
302 stars 227 forks source link

Nothing happens in CSipSimple when I try to place a call #45

Open el-gallo-azul opened 8 years ago

el-gallo-azul commented 8 years ago

This has been happening for about 2 weeks (via PPPoE, through an optical fibre connection).

It would sometimes work for a few weeks before that (via PPPoE, through an optical fibre connection)).

It would work 100% of the time before that (via modem, through an optical fibre connection).

At first, I thought it might be something to do with the connection method I was using, but I haven't been able to place a call using CSipSimple at all for a couple of weeks.

What steps will reproduce the problem? Try to place a call using CSipSimple.

What is the expected output? The call should start immediately, as it always did previously.

What do you see instead? The app looks as if it's trying to place the call, but there is no sound whatsoever.

What version of the product are you using? On what device / operating system? Samsung SM-G920I (Galaxy S6) Android 6.0.1 Official Australian Samsung ROM CSipSimple 1.02.03 r2470

Please provide any additional information below. I have tried killing and restarting the app. It doesn't work. I have tried restarting the phone. It doesn't work. Come to think of it, maybe the issue started happening around the same time as the ROM was updated one time.

el-gallo-azul commented 8 years ago

Further to this matter, I keep trying the app at least once each day. I just tried the 4th number for today and it worked. I tried the other 3 numbers several times each, so my success rate for the day has been in the order of 1/(1+3+3+3) = 10%.

zipcom commented 8 years ago

CsipSimple works on Cell Phones. Why there is anything to do with PPPoE fiber connection? Did you use direct IP call or SIP call via proxy server?

By the way, we have been using CsipSimple for quite a long while happily.

el-gallo-azul commented 8 years ago

I use CSipSimple on my mobile phone.

My mobile phone is connected to my network via wifi.

My network is connected to the internet via a PPPoE connection.

My internet connection over the PPPoE connection uses optical fibre, thus enabling a broadband connection, unlike ADSL.

I normally use a modem/router to connect to the internet, but I am using PPPoE at the moment as a step in the troubleshooting process for some unreliability in my internet connection. This unreliability shouldn't affect my ability to place calls via CSipSimple via SIP, because I always ensure that the internet connection from my mobile phone is working before attempting to place a SIP call using CSipSimple.

By the way, I was also using CSipSimple for quite a long while happily.

zipcom commented 8 years ago

I assume you are using a SIP Server somewhere. Please be specific. It could happen that the carrier has installed a more restricted NAT, which failed your CsipSimple registration to SIP Server. It could also happen when you dial a wrong address, not recognizable or whatever, which results in a "silent discard" of the INVITE message. Fiber or WiFi might NOT be the problem, we believe.

zipcom commented 8 years ago

Have you tried it out using 3G/4G? Did it work fine? It worth the try.

el-gallo-azul commented 8 years ago

No I didn't try that. It is prohibitively expensive, and rather unreliable, in Australia. 

el-gallo-azul commented 8 years ago

The SIP server for these call attempts was sip.internode.on.net I am 95% sure that one of the calls that didn't work was to the owner of that SIP server, which is Internode. I have found that if a call doesn't work using the standard Android dialler (and then selecting the CSipSimple account that I wish to use):      (picture in email)

I can start the app CSipSimple directly, and then dial the desired number, and sometimes the call works:

(picture in email)

...but this technique does not always work. It did work when I dialled this number this morning for these screenshots.

zipcom commented 8 years ago

You may need to have the server folks to look into their registration/call trace logs. Or, you may need to have Wireshark to trace the SIP messages., which seems too complicated for non-techy.

PPPoE Carrier's NAT/firewall is the biggest suspect. The IP address appears to be public but sometimes they provide NATed private address. You may need SIP traces to prove it.

el-gallo-azul commented 8 years ago

Today, I have been able to place 3 calls to Internode using CSipSimple directly without using the phone's dialler first. Each time, the call was answered, but their voice was cut off before they had finished speaking. It lasted about 5 seconds each time. I don't think they were able to hear me at all, either before or after their voice was cut off.

I used my mobile to call Internode and asked if they are able to see any SIP packets sent and received for my account. The assistant I spoke to said that they are not.

I also installed Wireshark on my PC, then realised that I need to capture packets on my Android device that I use for these SIP calls. I searched for "wireshark" in Android and found "Packet Capture" (version 1.2.3) which sounded promising, particularly because it does not require root. I then started to place calls to Internode while running "Packet Capture". Interestingly, the call was never established while I was running "Packet Capture". After about 6 attempts, I tried without "Packet Capture", and the call was established. I investigated this theme until I could be sure that I am not able to place a SIP call if the app "Packet Capture" is running at the same time. I tried a total of 18 times.

The problem doesn't seem to be related to something that would prevent SIP from working, such as NAT or firewall. It seems to be connected with something that "weakens" the signal, for example no "quality of service" management to prioritise SIP over other packets, or a weak wifi signal, or something of which I'm not aware, or all of these.

zipcom commented 8 years ago

Internode folks are NOT telling you the truth or they are not qualified engineers. If your calls did get through, the SIP Server definitely has involved in the call processing, and should have seen all the INVITE/ACK/200 OK/Ring messages.

Your calls last for 5 seconds is due to the (symmetric) NAT by the carrier. The NAT inhibits all the rtp (voice) packets and finally results in CsipSimple to disconnect the calls.

Internode folks should be able to resolve this NAT issue, by turning on "Server Relay" feature in the SIP Server. Otherwise, you should enable "ICE/TURN/STUN" and locate a public "TURN/STUN" server, which is much more complicated.

No, your problem has nothing to do with the "weak signal" or Quality of Service.

el-gallo-azul commented 8 years ago

I haven't insisted that Internode look at the registration/call trace logs yet. The reason for that is that yesterday, when I stopped using a PPPoE connection and moved back to my modem/router, as expected my SIP calls via CSipSimple started to work reliably again.

It seems to be something to do with the wifi connection between my Android phone and my PPPoE computer access point and possibly the internet connection from that point, because changing my access point/wifi node is the only change that I made.

juliejohn commented 8 years ago

Hi Sir,

Could you please help me for implementing CSIPSimple code with my own android application. We have updated the AccountTable with our own reguri, password,username but we were unable to make a registration call and hence the status is INACTIVE. It would be great if you could help me how I can call the Sip registration with my new DB values manually.

Thank You!!

tushar-patil-android commented 6 years ago

Hi @juliejohn,

Did you able to solve your issue, because I am facing the same issue.

If yes, can you please help me to solve my issue.

Thanks,