Need Help, Call to SIP Trunk Provider Randomly Disconnected after 10 seconds (call connected) - ID


(Utomo) #1

Hi Everyone,

I have problem with my Asterisk (new implementation),
IP Phone (Yealink T19) able to do outbond call to PSTN via SIP Trunk,
able to talk two ways audio with called party,
but suddenly call disconnected after (around) 10 seconds,
this outbond call issue happen randomly,
somehow it happen but somehow call are normal.
Already talk with our SIP Trunk provider but they only give us codec preferences (alaw & ulaw), 5060 port, pitime 20, and SIP Trunk IP address.
And they said error code in their system indicate for error code 102 (call setup timeup failure).
There is no NAT and firewall in my environment.
Inbound call are normal.

Bellow link download for verbose 5 and sip debug logs from normal and disconnected call, also peer detail for SIP trunk provider :
https://drive.google.com/drive/folders/1rbeVghRVeyeU1cLJ34jGv0CA7tQTkrfN?usp=sharing

Calling number = 541024
Called number = 79021803XX20 (prepend 79, send 021803XX20 to SIP trunk Provider)
Please help solve this issue.

Bellow my environtment :
FreePBX 2.11.0.42
Asterisk 11.21.0
Yealink IP Phone T19

#sip show peer sip_telkom (SIP Trunk to Provider)
vt100*CLI> sip show peer sip_telkom

  • Name : sip_telkom
    Description :
    Secret :
    MD5Secret :
    Remote Secret:
    Context : from-trunk-sip-sip_telkom
    Record On feature : automon
    Record Off feature : automon
    Subscr.Cont. :
    Language :
    Tonezone :
    AMA flags : Unknown
    Transfer mode: open
    CallingPres : Presentation Allowed, Not Screened
    Callgroup :
    Pickupgroup :
    Named Callgr :
    Nam. Pickupgr:
    MOH Suggest :
    Mailbox :
    VM Extension : *97
    LastMsgsSent : 0/0
    Call limit : 0
    Max forwards : 0
    Dynamic : No
    Callerid : “” <>
    MaxCallBR : 384 kbps
    Expire : -1
    Insecure : no
    Force rport : Auto (No)
    Symmetric RTP: No
    ACL : No
    DirectMedACL : No
    T.38 support : No
    T.38 EC mode : Unknown
    T.38 MaxDtgrm: 4294967295
    DirectMedia : Yes
    PromiscRedir : No
    User=Phone : No
    Video Support: No
    Text Support : No
    Ign SDP ver : No
    Trust RPID : No
    Send RPID : No
    TrustIDOutbnd: Legacy
    Subscriptions: Yes
    Overlap dial : Yes
    DTMFmode : rfc2833
    Timer T1 : 500
    Timer B : 32000
    ToHost : 10.36.0.137
    Addr->IP : 10.36.0.137:5060
    Defaddr->IP : (null)
    Prim.Transp. : UDP
    Allowed.Trsp : UDP
    Def. Username:
    SIP Options : 100rel precondition replaces replace timer
    Codecs : (gsm|ulaw|alaw)
    Codec Order : (gsm:20,ulaw:20,alaw:20)
    Auto-Framing : No
    Status : OK (4 ms)
    Useragent :
    Reg. Contact :
    Qualify Freq : 60000 ms
    Keepalive : 0 ms
    Sess-Timers : Accept
    Sess-Refresh : uas
    Sess-Expires : 1800 secs
    Min-Sess : 90 secs
    RTP Engine : asterisk
    Parkinglot :
    Use Reason : No
    Encryption : No

*sorry pake bhs inggris, copas dari grup sebelah, baru ngeh kalau ada forum ID nya,
mohon bantuan nya para suhu asterisk, hehe
Regards,

Utomo


(Agus Susanto) #2

Apakah bisa di informasikan setingan sip trunknya?


(Utomo) #3

Berikut konfigurasi SIP trunk yang mengarah telkom,

host=10.36.0.137
qualify=yes
type=peer
insecure=no
transport=udp
nat=auto_force_rport
directmedia=yes
dtmfmode=rfc2833
disallow=all
allow=gsm&ulaw&alaw


(Agus Susanto) #4

biasanya saya kalau ke telkom pake ini

host=IP_Telkom
type=peer
context=from-trunk
qualify=yes
transport=udp
insecure=port,invite
disallow=all
allow=alaw&ulaw
nat=no
canreinvite=no
directmedia=no
session-timers=refuse
prematurmedia=no
progressinband=yes


(Utomo) #5

Sudah saya coba menggunakan konfigurasi tsb namun hasil nya masih tetap sama,
apa ada ide lain?


(Agus Susanto) #6

Mungkin bisa di informasikan hasil lognya agar temen2 disini bisa membantu


(Utomo) #7

Setelah saya coba cek pcap file dari IP Phone nya,
ada “Request: BYE” source IP Add IP PBX, destination IP Add IP Phone" |

=================================================================
CSeq: 102 BYE
Sequence Number: 102
Method: BYE
User-Agent: FPBX-2.11.0(11.21.0)

X-Asterisk-HangupCause: Normal Clearing
Expert Info (Note/Undecoded): Unrecognised SIP header (X-Asterisk-HangupCause)
Message: Unrecognised SIP header (X-Asterisk-HangupCause)
Severity level: Note
Group: Undecoded
X-Asterisk-HangupCauseCode: 16
Expert Info (Note/Undecoded): Unrecognised SIP header (X-Asterisk-HangupCauseCode)
Message: Unrecognised SIP header (X-Asterisk-HangupCauseCode)


Really destroying SIP dialog ‘41e8eded092fc38a2397501935e4a6d0@10.18.1.10:5060’ Method: OPTIONS
Really destroying SIP dialog ‘794c4aea15f5c72e5dfab3201a927d5b@10.1.3.100:5060’ Method: OPTIONS

<— SIP read from UDP:10.36.0.137:5060 —>
BYE sip:0541209XX30@10.36.0.138:5060 SIP/2.0
Via: SIP/2.0/UDP 10.36.0.137:5060;branch=z9hG4bK00Bd3cce7885388b09d
From: sip:0218063XX20@10.36.0.137;tag=gK00d1e24c
To: sip:0541209XX30@10.36.0.138;tag=as060eeab2
Call-ID: 4ba6285e612c25562fb7d6c32476d54c@10.36.0.138:5060
CSeq: 292053 BYE
Max-Forwards: 70
Content-Length: 0

<------------->
— (8 headers 0 lines) —
Sending to 10.36.0.137:5060 (no NAT)
Scheduling destruction of SIP dialog ‘4ba6285e612c25562fb7d6c32476d54c@10.36.0.138:5060’ in 6400 ms (Method: BYE)

<— Transmitting (no NAT) to 10.36.0.137:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.36.0.137:5060;branch=z9hG4bK00Bd3cce7885388b09d;received=10.36.0.137
From: sip:0218063XX20@10.36.0.137;tag=gK00d1e24c
To: sip:0541209XX30@10.36.0.138;tag=as060eeab2
Call-ID: 4ba6285e612c25562fb7d6c32476d54c@10.36.0.138:5060
CSeq: 292053 BYE
Server: FPBX-2.11.0(11.21.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0

<------------>
– Executing [h@macro-dialout-trunk:1] Macro(“SIP/541024-00000095”, “hangupcall,”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“SIP/541024-00000095”, “1?endmixmoncheck”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [s@macro-hangupcall:9] NoOp(“SIP/541024-00000095”, “End of MIXMON check”) in new stack
– Executing [s@macro-hangupcall:10] GotoIf(“SIP/541024-00000095”, “1?nomeetmemon”) in new stack
– Goto (macro-hangupcall,s,28)
– Executing [s@macro-hangupcall:28] NoOp(“SIP/541024-00000095”, “End of MEETME check”) in new stack
– Executing [s@macro-hangupcall:29] GotoIf(“SIP/541024-00000095”, “1?noautomon”) in new stack
– Goto (macro-hangupcall,s,34)
– Executing [s@macro-hangupcall:34] NoOp(“SIP/541024-00000095”, “TOUCH_MONITOR_OUTPUT=”) in new stack
– Executing [s@macro-hangupcall:35] GotoIf(“SIP/541024-00000095”, “1?noautomon2”) in new stack
– Goto (macro-hangupcall,s,41)
– Executing [s@macro-hangupcall:41] NoOp(“SIP/541024-00000095”, “MONITOR_FILENAME=”) in new stack
– Executing [s@macro-hangupcall:42] GotoIf(“SIP/541024-00000095”, “1?noautomon3”) in new stack
– Goto (macro-hangupcall,s,48)
– Executing [s@macro-hangupcall:48] NoOp(“SIP/541024-00000095”, “MIXMONITOR_FILENAME=”) in new stack
– Executing [s@macro-hangupcall:49] GotoIf(“SIP/541024-00000095”, “1?noautomon4”) in new stack
– Goto (macro-hangupcall,s,51)
– Executing [s@macro-hangupcall:51] NoOp(“SIP/541024-00000095”, “ONETOUCH_RECFILE=”) in new stack
– Executing [s@macro-hangupcall:52] GotoIf(“SIP/541024-00000095”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,55)
– Executing [s@macro-hangupcall:55] GotoIf(“SIP/541024-00000095”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,58)
– Executing [s@macro-hangupcall:58] GotoIf(“SIP/541024-00000095”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,60)
– Executing [s@macro-hangupcall:60] AGI(“SIP/541024-00000095”, “hangup.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/hangup.agi
– <SIP/541024-00000095>AGI Script hangup.agi completed, returning 0
– Executing [s@macro-hangupcall:61] Hangup(“SIP/541024-00000095”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 61) exited non-zero on ‘SIP/541024-00000095’ in macro ‘hangupcall’
== Spawn extension (macro-dialout-trunk, h, 1) exited non-zero on ‘SIP/541024-00000095’
== Spawn extension (macro-dialout-trunk, s, 22) exited non-zero on ‘SIP/541024-00000095’ in macro ‘dialout-trunk’
== Spawn extension (from-internal, 790218063XX20, 5) exited non-zero on 'SIP/541024-00000095’
Scheduling destruction of SIP dialog ‘0_2839734912@10.102.101.196’ in 6400 ms (Method: ACK)
set_destination: Parsing sip:541024@10.102.101.196:5060 for address/port to send to
set_destination: set destination to 10.102.101.196:5060
Reliably Transmitting (no NAT) to 10.102.101.196:5060:
BYE sip:541024@10.102.101.196:5060 SIP/2.0
Via: SIP/2.0/UDP 10.18.1.10:5060;branch=z9hG4bK32fc12fe
Max-Forwards: 70
From: sip:790218063XX20@10.18.1.10:5060;tag=as6892b4ad
To: “541024” sip:541024@10.18.1.10:5060;tag=961902925
Call-ID: 0_2839734912@10.102.101.196
CSeq: 102 BYE
User-Agent: FPBX-2.11.0(11.21.0)
Proxy-Authorization: Digest username=“541024”, realm=“asterisk”, algorithm=MD5, uri=“sip:10.18.1.10”, nonce=“534459b3”, response="9ec78238f068c424d6b8e79ed3c14ccc"
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0


(Agus Susanto) #8

Lognya rada susah dibaca :smiley: mungkin perlu ditambahkan topology sama IP yang digunakan


(Utomo) #9

IP PBX LAN = 10.18.1.10
IP PBX WAN (To SIP trunk Telkom | Directly connected) = 10.36.0.138
SIP Trunk Provider (telkom) = 10.36.0.137
IP Phone = 10.102.101.196

Call flow nya :
IP Phone --> IP PBX --> Sip Trunk Telkom --> nomor telp tujuan

:slight_smile:


(Agus Susanto) #10

dari IP PBX ke IP Phone ga satu network yah? Kalau ga, dicoba aja dulu dengan jaringan satu network


(Utomo) #11

Sebelumnya sudah dicoba menggunakan ip phone yang satu subnet dengan ip pbx, akan tetapi hasilnya sama saja,


(godril) #12

Kalo di liat dari share di google driver, terutama Call-ID 0_2839734912 itu, memang BYE nya dateng dari PBX dan kok memang nda keliatan ya penyabnya

Scheduling destruction of SIP dialog '0_2839734912@10.102.101.196' in 6400 ms (Method: ACK)
set_destination: Parsing <sip:541024@10.102.101.196:5060> for address/port to send to
set_destination: set destination to 10.102.101.196:5060
Reliably Transmitting (no NAT) to 10.102.101.196:5060:
BYE sip:541024@10.102.101.196:5060 SIP/2.0
Via: SIP/2.0/UDP 10.18.1.10:5060;branch=z9hG4bK32fc12fe
Max-Forwards: 70
From: <sip:790218063XX20@10.18.1.10:5060>;tag=as6892b4ad
To: "541024" <sip:541024@10.18.1.10:5060>;tag=961902925
Call-ID: 0_2839734912@10.102.101.196
CSeq: 102 BYE
User-Agent: FPBX-2.11.0(11.21.0)
Proxy-Authorization: Digest username="541024", realm="asterisk", algorithm=MD5, uri="sip:10.18.1.10", nonce="534459b3", response="9ec78238f068c424d6b8e79ed3c14ccc"
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0

Oke, ide bodoh,… saya lihat quote info dari system:

102 (call setup timeup failure).

misal di setting trunk apakah bisa ditambahkan baris"

session-timers=refuse

Apakah ada perbedaan?