Problems with calls dropping on Android.

Home » Asterisk Users » Problems with calls dropping on Android.
Asterisk Users No Comments

This is a multipart message in MIME format.

——=_NextPart_000_000A_01D5826D.6D797460
Content-Type: text/plain;
charset=”us-ascii”
Content-Transfer-Encoding: 7bit

Hello.

I have the following in sip.conf

[sip09]

type=peer

defaultuser=sip09

nat=yes

qualify=no

secret=sip09

host=dynamic

context=outgoing

dtmfmode=rfc2833

disallow=all

allow=ulaw

allow=alaw

allow=h263p

deny=0.0.0.0/0.0.0.0

permit2.168.2.2/255.255.255.255

jbenable = yes

jbforce = yes

jbmaxsize = 100

jbresyncthreshold = 200

jbimpl = fixed

transport=tcp

sendrpid=yes

And these settings in Android native client.

Username: sip09

Password: sip09

Server: 192.168.1.10

Username at authentication: sip09

Display name: Same as username

Outgoing proxy: 192.168.1.10

Port: 5060

Transport: TCP

Send keep alive: Always

However, if I make a call FROM android phone, call is dropped after 30
seconds, regardless of answer or not. If I make call TO android phone, it works normally.

No NAT problems inbetween, there is a VPN between the phone and SIP server with full access.

I guess I need to do some trick to have it work with Android. Apparently the packets are received in both ends – else audio wouldn’t work, but guess the stock native SIP client on android ignores certain packets right?

This is an Android 9 phone.

Additionally, I wonder if its possible to change the callerid shown in display when calling out? Like RPID. It works on my desktop phones, if I
enter a short code, the full name and number is shown on display, but on the Android phone, it doesn’t work, only the dialled shortnumber is shown.

Also I wonder if its possible to have asterisk send the remote callerid
(when receiving a call) in such a way it gets stored in call log with full names and such – without having to resort to using phonebook.

SIP debug log:

*CLI> sip set debug ip 192.168.2.2

SIP Debugging Enabled for IP: 192.168.2.2

*CLI> Really destroying SIP dialog
‘6f9956035553ab1b79ca057f5dffe0ac@192.168.2.2’ Method: OPTIONS

Really destroying SIP dialog ‘fc3307059c816094a6c6ce100cf383e5@192.168.2.2’
Method: OPTIONS

<--- SIP read from TCP:192.168.2.2:51729 --->

OPTIONS sip:192.168.1.10 SIP/2.0

Call-ID: e65234cb818a143bc3c167a782b98e96@192.168.2.2

CSeq: 3984 OPTIONS

From: “sip09” ;tag997716169

To: “sip09”

Via: SIP/2.0/TCP
192.168.2.2:56334;branch=z9hG4bK105b3648c13a72f8fbe7ce3049df71aa3130;rport

Max-Forwards: 70

User-Agent: SIPAUA/0.1.001

Content-Length: 0

<------------->

— (9 headers 0 lines) –