Getting "480 temporarily unavailable" error

Hi asterisks Support.
I currently building an asterisk server for an extension system.
Now I have a problem; when my client makes a call, he gets an ‘480 temporarily unavailable’ error, this happens sometimes, but not always.
When I make a call with pjsua client, then there is not a problem and I can just make the call.
What could be the problem of this, is there anything that I can changes in the configurations or something?
Any suggentions would be helpful. Thankyou.

My asterisk server info is:

  • Using aws service and server is ec2 instance. (t2.micro)
  • Os is centos 7.5.
  • Asterisk version is Asterisk 13.11.0-rc1.
  • not setting an domain for server.
  • Using realtime database. (amazon rds)

My client info is:

  • Using android device.(ZenfoneMAX(7.0)、Nexus 5X(8.0))
  • Using Android sip libraly.
  • Android framework is
  • Using wifi network in a building

My asterisk settings is:

/etc/asterisk/sip.conf

; SIP Configuration for Asterisk
[general]
context => public ; Default context for incoming calls. Defaults to 'default'
allowguest => no ; Allow or reject guest calls (default is yes)
allowoverlap => no ; Disable overlap dialing support. (Default is yes)
tcpenable => yes ; Enable server for incoming TCP connections (default is no)
tcpbindaddr => 0.0.0.0:***** ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces)
udpbindaddr => 0.0.0.0:***** ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
transport => udp ; Set the default transports.  The order determines the primary default transport.
nat => force_rport,comedia
localnet => ***************/255.255.0.0 ; NAT SUPPORT
externaddr => ***************/ ; NAT SUPPORT
media_address => ***************/ ; NAT SUPPORT
directmedia => no
srvlookup => yes ; Enable DNS SRV lookups on outbound calls
language => ja ; Default language setting for all users/peers
rtcachefriends => yes ; realtime database settings
rtautoclear => yes ; realtime database settings

;------------------------------ quality settings --------------------------
udpbindaddr => 0.0.0.0:*****    ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
                                ; Optionally add a port number, 192.168.1.1:5062 (default is port 5060)

tcpenable => no                 ; Enable server for incoming TCP connections (default is no)
tcpbindaddr => 0.0.0.0:*****    ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces)
                                ; Optionally add a port number, 192.168.1.1:5062 (default is port 5060)

tos_sip => cs3                  ; Sets TOS for SIP packets.
tos_audio => ef                 ; Sets TOS for RTP audio packets.

cos_sip => 3                    ; Sets 802.1p priority for SIP packets.
cos_audio => 5                  ; Sets 802.1p priority for RTP audio packets.

;------------------------------ JITTER BUFFER CONFIGURATION --------------------------
jbenable => no                  ; Enables the use of a jitterbuffer on the receiving side of a
                                ; SIP channel. Defaults to "no". An enabled jitterbuffer will
                                ; be used only if the sending side can create and the receiving
                                ; side can not accept jitter. The SIP channel can accept jitter,
                                ; thus a jitterbuffer on the receive SIP side will be used only
                                ; if it is forced and enabled.
                                ; (和訳)SIPチャネルの受信側でジッタバッファを使用できるようにします。
                                ; デフォルトは「いいえ」です。有効なジッタバッファは、送信側が作成でき、
                                ; 受信側がジッタを受け入れることができない場合にのみ使用されます。
                                ; SIPチャネルはジッタを受け入れることができます。
                                ; したがって、受信SIP側のジッタバッファは、
                                ; 強制的に有効化されている場合にのみ使用されます。

jbforce => no                   ; Forces the use of a jitterbuffer on the receive side of a SIP
                                ; channel. Defaults to "no".
                                ; (和訳)SIPチャネルの受信側でジッタバッファを強制的に使用します。
                                ; デフォルトは「いいえ」です。

jbmaxsize => 200                ; Max length of the jitterbuffer in milliseconds.
                                ; (和訳)ジッタバッファの最大長(ミリ秒単位)。

jbresyncthreshold => 1000       ; Jump in the frame timestamps over which the jitterbuffer is
                                ; resynchronized. Useful to improve the quality of the voice, with
                                ; big jumps in/broken timestamps, usually sent from exotic devices
                                ; and programs. Defaults to 1000.
                                ; (和訳)ジッタバッファが再同期されるフレームタイムスタンプ内をジャンプします。
                                ; 通常はエキゾチックなデバイスやプログラムから送信される、
                                ; 壊れたタイムスタンプの大きなジャンプで、音声の品質を向上させるのに便利です。
                                ; デフォルトは1000です。

jbimpl => fixed                 ; Jitterbuffer implementation, used on the receiving side of a SIP
                                ; channel. Two implementations are currently available - "fixed"
                                ; (with size always equals to jbmaxsize) and "adaptive" (with
                                ; variable size, actually the new jb of IAX2). Defaults to fixed.
                                ; (和訳)SIPチャネルの受信側で使用されるJitterbuffer実装。
                                ; 現在のところ、 "fixed"(サイズは常にjbmaxsizeに等しい)と 
                                ; "adaptive"(可変サイズで、実際はIAX2の新しいjb)という
                                ; 2つの実装が利用可能です。デフォルトは固定です。

jbtargetextra => 40             ; This option only affects the jb when 'jbimpl = adaptive' is set.
                                ; The option represents the number of milliseconds by which the new jitter buffer
                                ; will pad its size. the default is 40, so without modification, the new
                                ; jitter buffer will set its size to the jitter value plus 40 milliseconds.
                                ; increasing this value may help if your network normally has low jitter,
                                ; but occasionally has spikes.
                                ; (和訳)このオプションは、 'jbimpl = adaptive'が設定されている場合に
                                ; のみjbに影響します。このオプションは、新しいジッタバッファがその
                                ; サイズを埋めるまでのミリ秒数を表します。デフォルトは40ですので、
                                ; 変更なしでは、新しいジッタバッファはジッタ値に40ミリ秒を加えたサイズに設定されます。
                                ; この値を大きくすると、ネットワークのジッタが通常は低くなりますが、
                                ; 時にはスパイクが発生することがあります。

jblog => yes                    ; Enables jitterbuffer frame logging. Defaults to "no".
                                ; (和訳)ジッタバッファフレームロギングをイネーブルにします。
                                ; デフォルトは「いいえ」です。
;-----------------------------------------------------------------------------------

rtptimeout => 1

/etc/asterisk/rtp.conf

[general]
rtpstart=*****
rtpend=*****

/etc/asterisk/asterisk.conf

[directories]
astetcdir => /etc/asterisk
astmoddir => /usr/lib/asterisk/modules
astvarlibdir => /var/lib/asterisk
astagidir => /var/lib/asterisk/agi-bin
astspooldir => /var/spool/asterisk
astrundir => /var/run/asterisk
astlogdir => /var/log/asterisk

[options]
languageprefix => yes
minmemfree => 50

sip_buddies table (realtime database table)

id name ipaddr port regseconds defaultuser fullcontact regserver useragent lastms host type context permit deny secret md5secret remotesecret transport dtmfmode directmedia nat callgroup pickupgroup language allow disallow insecure trustrpid progressinband promiscredir useclientcode accountcode setvar callerid amaflags callcounter busylevel allowoverlap allowsubscribe videosupport maxcallbitrate rfc2833compensate mailbox session-timers session-expires session-minse session-refresher t38pt_usertpsource regexten fromdomain fromuser qualify defaultip rtptimeout rtpholdtimeout sendrpid outboundproxy callbackextension timert1 timerb qualifyfreq constantssrc contactpermit contactdeny usereqphone textsupport faxdetect buggymwi auth fullname trunkname cid_number callingpres mohinterpret mohsuggest parkinglot hasvoicemail subscribemwi vmexten autoframing rtpkeepalive call-limit g726nonstandard ignoresdpversion allowtransfer dynamic
1001 marshalai_3_1 0 0 marshalai_3_1 0 dynamic friend ctx_marshal-i \N \N ***** \N \N \N rfc2833 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N yes \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 1 \N \N \N \N
1002 marshalai_3_2 0 0 marshalai_3_2 175 dynamic friend ctx_marshal-i \N \N ***** \N \N \N rfc2833 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N yes \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 1 \N \N \N \N
1003 marshalai_3_3 116.91.70.104 63799 1528956340 marshalai_3_3 sip:marshalai_3_3@116.91.70.104:63799^3Bob CSipSimple_D6653-23/r2457 1146 dynamic friend ctx_marshal-i \N \N ***** \N \N \N rfc2833 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N yes \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 1 \N \N \N \N
1004 marshalai_3_4 116.91.70.104 60748 1528957865 marshalai_3_4 sip:marshalai_3_4@172.17.3.64:57714^3Btransport=udp SIPAUA/0.1.001 -1 dynamic friend ctx_marshal-i \N \N ***** \N \N \N rfc2833 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N yes \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 1 \N \N \N \N
1005 marshalai_3_5 0 0 marshalai_3_5 0 dynamic friend ctx_marshal-i \N \N ***** \N \N \N rfc2833 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N yes \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 1 \N \N \N \N
1006 marshalai_3_6 0 0 marshalai_3_6 132 dynamic friend ctx_marshal-i \N \N ***** \N \N \N rfc2833 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N yes \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 1 \N \N \N \N
1007 marshalai_3_7 116.91.70.104 63669 1528958458 marshalai_3_7 sip:marshalai_3_7@172.17.3.6:49972^3Btransport=udp SIPAUA/0.1.001 429 dynamic friend ctx_marshal-i \N \N ***** \N \N \N rfc2833 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N yes \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 1 \N \N \N \N
1008 marshalai_3_8 116.91.70.104 61578 1528957259 marshalai_3_8 sip:marshalai_3_8@172.17.3.39:38776^3Btransport=udp SIPAUA/0.1.001 139 dynamic friend ctx_marshal-i \N \N ***** \N \N \N rfc2833 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N yes \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 1 \N \N \N \N
1009 marshalai_3_9 0 0 marshalai_3_9 0 dynamic friend ctx_marshal-i \N \N ***** \N \N \N rfc2833 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N yes \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 1 \N \N \N \N

Here is the asterisk messages that got the ‘480 temporarily unavailable’ error.

<------------>
[Jun 14 12:09:04] VERBOSE[5443][C-0000007f] pbx.c: Executing [marshalai_3_7@ctx_marshal-i:1] NoOp("SIP/marshalai_3_8-000000a8", "marshalai_3_8 CALL TO marshalai_3_7.") in new stack
[Jun 14 12:09:04] VERBOSE[5443][C-0000007f] pbx.c: Executing [marshalai_3_7@ctx_marshal-i:2] Set("SIP/marshalai_3_8-000000a8", "__MAXCALL=201") in new stack
[Jun 14 12:09:04] VERBOSE[5443][C-0000007f] pbx.c: Executing [marshalai_3_7@ctx_marshal-i:3] AGI("SIP/marshalai_3_8-000000a8", "/var/lib/asterisk/agi-bin/marshal-i/gather_info.php,marshalai_3_7") in new stack
[Jun 14 12:09:04] VERBOSE[5443][C-0000007f] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/marshal-i/gather_info.php
[Jun 14 12:09:04] VERBOSE[5443][C-0000007f] res_agi.c: <SIP/marshalai_3_8-000000a8>AGI Script /var/lib/asterisk/agi-bin/marshal-i/gather_info.php completed, returning 0
[Jun 14 12:09:04] VERBOSE[5443][C-0000007f] pbx.c: Executing [marshalai_3_7@ctx_marshal-i:4] NoOp("SIP/marshalai_3_8-000000a8", "CENTER=3") in new stack
[Jun 14 12:09:04] VERBOSE[5443][C-0000007f] pbx.c: Executing [marshalai_3_7@ctx_marshal-i:5] NoOp("SIP/marshalai_3_8-000000a8", "ACCOUNT=7") in new stack
[Jun 14 12:09:04] VERBOSE[5443][C-0000007f] pbx.c: Executing [marshalai_3_7@ctx_marshal-i:6] NoOp("SIP/marshalai_3_8-000000a8", "RET=1") in new stack
[Jun 14 12:09:04] VERBOSE[5443][C-0000007f] pbx.c: Executing [marshalai_3_7@ctx_marshal-i:7] Set("SIP/marshalai_3_8-000000a8", "GROUP()=NUMBER_OF_CALLS") in new stack
[Jun 14 12:09:04] VERBOSE[5443][C-0000007f] pbx.c: Executing [marshalai_3_7@ctx_marshal-i:8] GotoIf("SIP/marshalai_3_8-000000a8", "1?lbl_continue:lbl_play_beeperr") in new stack
[Jun 14 12:09:04] VERBOSE[5443][C-0000007f] pbx_builtins.c: Goto (ctx_marshal-i,marshalai_3_7,10)
[Jun 14 12:09:04] VERBOSE[5443][C-0000007f] pbx.c: Executing [marshalai_3_7@ctx_marshal-i:10] NoOp("SIP/marshalai_3_8-000000a8", "") in new stack
[Jun 14 12:09:04] VERBOSE[5443][C-0000007f] pbx.c: Executing [marshalai_3_7@ctx_marshal-i:11] NoOp("SIP/marshalai_3_8-000000a8", "current number of calls=1") in new stack
[Jun 14 12:09:04] VERBOSE[5443][C-0000007f] pbx.c: Executing [marshalai_3_7@ctx_marshal-i:12] Dial("SIP/marshalai_3_8-000000a8", "SIP/marshalai_3_7/marshalai_3_7") in new stack
[Jun 14 12:09:04] WARNING[5443][C-0000007f] app_dial.c: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent)
[Jun 14 12:09:04] VERBOSE[5443][C-0000007f] app_dial.c: Everyone is busy/congested at this time (1:0/0/1)
[Jun 14 12:09:04] VERBOSE[5443][C-0000007f] pbx.c: Executing [marshalai_3_7@ctx_marshal-i:13] Goto("SIP/marshalai_3_8-000000a8", "lbl_hang") in new stack
[Jun 14 12:09:04] VERBOSE[5443][C-0000007f] pbx_builtins.c: Goto (ctx_marshal-i,marshalai_3_7,18)
[Jun 14 12:09:04] VERBOSE[5443][C-0000007f] pbx.c: Executing [marshalai_3_7@ctx_marshal-i:18] Hangup("SIP/marshalai_3_8-000000a8", "") in new stack
[Jun 14 12:09:04] VERBOSE[5443][C-0000007f] pbx.c: Spawn extension (ctx_marshal-i, marshalai_3_7, 18) exited non-zero on 'SIP/marshalai_3_8-000000a8'
[Jun 14 12:09:04] VERBOSE[5443][C-0000007f] chan_sip.c: Scheduling destruction of SIP dialog 'a09eb489c1d1c113253aa725e77d3535@172.17.3.39' in 115072 ms (Method: INVITE)
[Jun 14 12:09:04] VERBOSE[5443][C-0000007f] chan_sip.c: 
<--- Reliably Transmitting (NAT) to 116.91.70.104:61578 --->
SIP/2.0 480 Temporarily unavailable
Via: SIP/2.0/UDP 172.17.3.39:38776;branch=z9hG4bK6a3348262852854921ff61c9f29f34c7393332;received=116.91.70.104;rport=61578
From: <sip:marshalai_3_8@***************:*****>;tag=2129910419
To: <sip:marshalai_3_7@***************:*****>;tag=as2f11f7a7
Call-ID: a09eb489c1d1c113253aa725e77d3535@172.17.3.39
CSeq: 6668 INVITE
Server: Asterisk PBX 13.11.0-rc1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<------------>
[Jun 14 12:09:04] VERBOSE[1278] chan_sip.c: Really destroying SIP dialog '05b8fff66683cd0f046887722355963e@127.0.0.1:*****' Method: INVITE
[Jun 14 12:09:04] VERBOSE[1278] chan_sip.c: 
<--- SIP read from UDP:116.91.70.104:61578 --->
INVITE sip:marshalai_3_7@***************:***** SIP/2.0
Call-ID: a09eb489c1d1c113253aa725e77d3535@172.17.3.39
CSeq: 6668 INVITE
From: <sip:marshalai_3_8@***************:*****>;tag=2129910419
To: <sip:marshalai_3_7@***************:*****>
Via: SIP/2.0/UDP 172.17.3.39:38776;branch=z9hG4bK6a3348262852854921ff61c9f29f34c7393332;rport
Max-Forwards: 70
Contact: <sip:marshalai_3_8@172.17.3.39:38776;transport=udp>
Content-Type: application/sdp
Authorization: Digest username="marshalai_3_8",realm="asterisk",nonce="673be176",uri="sip:marshalai_3_7@***************:*****",response="1a035150ca7035fb6ceee740aa2d4124",algorithm=MD5
Content-Length: 295

v=0
o=- 1528945743717 1528945743747 IN IP4 172.17.3.39
s=-
c=IN IP4 172.17.3.39
t=0 0
m=audio 58140 RTP/AVP 96 97 3 0 8 127
a=rtpmap:96 GSM-EFR/8000
a=rtpmap:97 AMR/8000
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:127 telephone-event/8000
a=fmtp:127 0-15
<------------->
[Jun 14 12:09:04] VERBOSE[1278] chan_sip.c: --- (11 headers 13 lines) ---
[Jun 14 12:09:04] VERBOSE[1278][C-0000007f] chan_sip.c: Ignoring this INVITE request
[Jun 14 12:09:04] VERBOSE[1278] chan_sip.c: 
<--- SIP read from UDP:116.91.70.104:61578 --->
ACK sip:marshalai_3_7@***************:***** SIP/2.0
Call-ID: a09eb489c1d1c113253aa725e77d3535@172.17.3.39
Max-Forwards: 70
From: <sip:marshalai_3_8@***************:*****>;tag=2129910419
To: <sip:marshalai_3_7@***************:*****>;tag=as2f11f7a7
Via: SIP/2.0/UDP 172.17.3.39:38776;branch=z9hG4bK6a3348262852854921ff61c9f29f34c7393332;rport
CSeq: 6668 ACK
Content-Length: 0

<------------->
[Jun 14 12:09:04] VERBOSE[1278] chan_sip.c: --- (8 headers 0 lines) ---
[Jun 14 12:09:04] VERBOSE[1278] chan_sip.c: Retransmitting #3 (NAT) to 116.91.70.104:63799:
OPTIONS sip:marshalai_3_3@116.91.70.104:63799;ob SIP/2.0
Via: SIP/2.0/UDP ***************:*****;branch=z9hG4bK0613ccc7;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk@***************:*****>;tag=as49398e5e
To: <sip:marshalai_3_3@116.91.70.104:63799;ob>
Contact: <sip:asterisk@***************:*****>
Call-ID: 24dca4121c6d19e4334688602443ad60@***************:*****
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 13.11.0-rc1
Date: Thu, 14 Jun 2018 03:09:01 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


---
[Jun 14 12:09:05] VERBOSE[1278] chan_sip.c: Retransmitting #4 (NAT) to 116.91.70.104:63799:
OPTIONS sip:marshalai_3_3@116.91.70.104:63799;ob SIP/2.0
Via: SIP/2.0/UDP ***************:*****;branch=z9hG4bK0613ccc7;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk@***************:*****>;tag=as49398e5e
To: <sip:marshalai_3_3@116.91.70.104:63799;ob>
Contact: <sip:asterisk@***************:*****>
Call-ID: 24dca4121c6d19e4334688602443ad60@***************:*****
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 13.11.0-rc1
Date: Thu, 14 Jun 2018 03:09:01 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


---
[Jun 14 12:09:05] VERBOSE[1278] chan_sip.c: Really destroying SIP dialog '24dca4121c6d19e4334688602443ad60@***************:*****' Method: OPTIONS
[Jun 14 12:09:05] VERBOSE[1278] chan_sip.c: Really destroying SIP dialog '66037081709de58e2f0c6331a5a6e561@172.17.3.79' Method: ACK
[Jun 14 12:09:06] VERBOSE[1278] chan_sip.c: Reliably Transmitting (NAT) to 116.91.70.104:61763:
OPTIONS sip:marshalai_3_4@172.17.3.64:57999;transport=udp SIP/2.0
Via: SIP/2.0/UDP ***************:*****;branch=z9hG4bK4f3d2657;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk@***************:*****>;tag=as34465b90
To: <sip:marshalai_3_4@172.17.3.64:57999;transport=udp>
Contact: <sip:asterisk@***************:*****>
Call-ID: 21d7aec83d86f6a2472fee845c00b462@***************:*****
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 13.11.0-rc1
Date: Thu, 14 Jun 2018 03:09:06 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


---
[Jun 14 12:09:06] VERBOSE[1278] chan_sip.c: 
<--- SIP read from UDP:116.91.70.104:61763 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP ***************:*****;branch=z9hG4bK4f3d2657;rport=*****;received=***************
From: "asterisk" <sip:asterisk@***************:*****>;tag=as34465b90
To: <sip:marshalai_3_4@172.17.3.64:57999;transport=udp>
Call-ID: 21d7aec83d86f6a2472fee845c00b462@***************:*****
CSeq: 102 OPTIONS
Content-Length: 0

<------------->
[Jun 14 12:09:06] VERBOSE[1278] chan_sip.c: --- (7 headers 0 lines) ---
[Jun 14 12:09:06] VERBOSE[1278] chan_sip.c: Really destroying SIP dialog '21d7aec83d86f6a2472fee845c00b462@***************:*****' Method: OPTIONS
[Jun 14 12:09:06] VERBOSE[1278] chan_sip.c: Really destroying SIP dialog '469c228591630a24b966534ccf03f661@172.17.3.79' Method: ACK
[Jun 14 12:09:06] VERBOSE[1278] chan_sip.c: Really destroying SIP dialog '97870c2bbdf8e0424b063bfd57f1a3c3@172.17.3.79' Method: ACK
[Jun 14 12:09:07] VERBOSE[1278] chan_sip.c: Really destroying SIP dialog '36dd4d0a690fcda3ad9adde9c48a15ca@172.17.3.79' Method: ACK
[Jun 14 12:09:07] VERBOSE[1278] chan_sip.c: Really destroying SIP dialog '0c587c231416539173c2c693284e3583@172.17.3.79' Method: ACK
[Jun 14 12:09:07] VERBOSE[1278] chan_sip.c: Really destroying SIP dialog '137d95713afb77d58258043b3297a530@172.17.3.79' Method: ACK
[Jun 14 12:09:12] VERBOSE[1278] chan_sip.c: Really destroying SIP dialog 'ee7a09f793d1d947885b52c775f7b0e7@172.17.3.64' Method: OPTIONS
[Jun 14 12:09:12] VERBOSE[1278] chan_sip.c: Really destroying SIP dialog 'e99e10a3b6eeaceb10dc169ec818f89a@172.17.3.64' Method: OPTIONS
[Jun 14 12:09:13] VERBOSE[1278] chan_sip.c: 
<--- SIP read from UDP:116.91.70.104:60968 --->
OPTIONS sip:***************:***** SIP/2.0
Call-ID: 67d993c983cb89353780db89639ee70b@172.17.3.79
CSeq: 5080 OPTIONS
From: <sip:marshalai_3_2@***************:*****>;tag=2463635639
To: <sip:marshalai_3_2@***************:*****>
Via: SIP/2.0/UDP 172.17.3.79:41684;branch=z9hG4bK8b912fa3685a89fd869adda213fa3fa4313638;rport
Max-Forwards: 70
User-Agent: SIPAUA/0.1.001
Content-Length: 0

<------------->
[Jun 14 12:09:13] VERBOSE[1278] chan_sip.c: --- (9 headers 0 lines) ---
[Jun 14 12:09:13] VERBOSE[1278] chan_sip.c: Sending to 116.91.70.104:60968 (NAT)
[Jun 14 12:09:13] VERBOSE[1278] chan_sip.c: Looking for s in public (domain ***************)
[Jun 14 12:09:13] VERBOSE[1278] chan_sip.c: 
<--- Transmitting (NAT) to 116.91.70.104:60968 --->
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 172.17.3.79:41684;branch=z9hG4bK8b912fa3685a89fd869adda213fa3fa4313638;received=116.91.70.104;rport=60968
From: <sip:marshalai_3_2@***************:*****>;tag=2463635639
To: <sip:marshalai_3_2@***************:*****>;tag=as346a500b
Call-ID: 67d993c983cb89353780db89639ee70b@172.17.3.79
CSeq: 5080 OPTIONS
Server: Asterisk PBX 13.11.0-rc1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Accept: application/sdp
Content-Length: 0

The destination device is not registered or has failed a qualify test. Could be due to the network losing too many packets.

Thank you for reply, David551.

So that means the problem is client side?
So what would be the best option to resolve this problem.
I asked my client for re-registration and this worked succesfully, but sometimes the problem keeps coming back, while other times it works just fine.

What could be the problem of this.

Thank you.

The best option to avoid lost registrations is to use static addresses, instead. Otherwise you are going to need to look at the traffic and work out why the registrations are failing. If it is lost packets, you will need to reduce the network overload, or prioritise SIP traffic in the network.

Thank you for reply, David551.

My client are using android device and network is wifi or 4G. so using static address for client is difficult.

If the story is that the packet are getting lost, will It be because of the changes in the network service?
I’m wandering if amazon network is good.
What do you think; is Amazon network service suitable for an asterisk server?

Thank you.