Contacts status is unavailable although endpoint is registered on softphone


#1

I have this issue where the contacts for endpoints show status as unavailable although the softphone shows it is registered and I can make calls. When I call this extension from another side, as all contacts are unavailable none of the softphones will ring.

[105]
type = aor
max_contacts = 1
;remove_existing = yes
;rewrite_contact=yes
qualify_frequency = 60
maximum_expiration = 3600
minimum_expiration = 60
default_expiration = 120

[105]
type = auth
username = 105
password = xxxxxx

[105]
type = endpoint
dtmf_mode = rfc4733
disallow = all
allow = ulaw
allow = alaw
allow = gsm
allow = g726
allow = h264
allow = mpeg4
allow = vp8
allow = h263p
rtp_timeout = 30
timers = yes
direct_media = no
callerid = 105 <Zone_5>
send_pai = yes
use_avpf = no
named_call_group = 
named_pickup_group = 
tos_audio = ef
tos_video = af41
auth = 105
outbound_auth = 105
aors = 105



[140]
type = aor
max_contacts = 20 
qualify_frequency = 60
maximum_expiration = 3600
minimum_expiration = 60
default_expiration = 120
;remove_existing = yes
;rewrite_contact=yes

[140]
type = auth
username = 140
password = xxx140

[140]
type = endpoint
dtmf_mode = rfc4733
allow = all
rtp_timeout = 30
timers = yes
direct_media = no
callerid = 140 <Mobile Exten 140>
send_pai = yes
auth = 140
outbound_auth = 140
aors = 140
dtmf_mode=rfc4733
media_encryption=sdes
transport = transport-tls
rtp_symmetric=yes
force_rport=yes

[141]
type = aor
max_contacts = 20 
qualify_frequency = 60
maximum_expiration = 3600
minimum_expiration = 60
default_expiration = 120
;remove_existing = yes
;rewrite_contact=yes

pjsip show contacts will show

  Contact:  105/sip:105@192.168.2.110:15394                       d0a8053df8 Unavail       0.000
  Contact:  105/sip:105@192.168.2.110:15394                       d0a8053df8 Unavail       0.000
  Contact:  140/sip:140@10.222.241.29:49744;transport=tls  d619782f4a Unavail       0.000
  Contact:  140/sip:140@10.222.241.29:49744;transport=tls  d619782f4a Unavail       0.000
  Contact:  140/sip:140@10.225.59.45:37053;transport=tls    5ecedd2edf Unavail       0.000
  Contact:  140/sip:140@10.225.59.45:37053;transport=tls    5ecedd2edf Unavail       0.000

#2

If you uncomment rewrite_contact does that change things? It’s likely the client doesn’t accept incoming connections and wants connection reuse, which rewrite_contact will do.


#3

Enabling rewrite_contact helps to solve the problem for 105 which is using the local IP address of the Asterisk server and using UDP transport. 140 which is using NAT + Public IP + TLS is still behaving same.

One more issue that is seen is that in pjsip show contacts each contact appears twice


#4

I was using grandstream wave app , using Zoiper instead solves the issue for 140 extensions as well. There is a slight difference in the contact URI, zoiper adds ;r to the ContactUri. 140/sip:140@82.178.22.45:42975;transport=TLS;r , still its have two exactly similar entries in pjsip show contacts

Can you point to some settings that might fix this behaviour in the same app?


#5

I don’t know the apps, so I can’t comment on that.

As for the double entries in “pjsip show contacts” this is a known issue and there is already an issue filed on the issue tracker for it.

Did 140 re-register? Have you done a packet capture to examine the traffic (pjsip set logger on) and see the actual source address?