Infactum / tg2sip

Telegram <-> SIP voice gateway
GNU General Public License v2.0
281 stars 104 forks source link

Unable to make SIP->TG calls after about a week of the running app. Restart has helped. #5

Closed minchik closed 5 years ago

minchik commented 5 years ago

[08:52:28.999][t:8][p:1][pjsip][debug] RX 907 bytes Request msg INVITE/cseq=102 (rdata0x7f7944011018) from UDP 10.10.1.1:5060: INVITE sip:tg%23XXXXXXXXXXXXXXX@10.10.1.2 SIP/2.0 Via: SIP/2.0/UDP 10.10.1.1:5060;branch=z9hG4bK07e289ec Max-Forwards: 70 From: "XXXXXXX XXXXXXXX" sip:250@10.10.1.1;tag=as1132a0f1 To: sip:tg%23XXXXXXXXXXXXXXX@10.10.1.2 Contact: sip:250@10.10.1.1:5060 Call-ID: 6fb55cc40eacfc4e30806e5a32fc0d8b@10.10.1.1:5060 CSeq: 102 INVITE User-Agent: Asterisk PBX 13.23.1 Date: Thu, 29 Nov 2018 08:52:28 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer Content-Type: application/sdp Content-Length: 338

v=0 o=root 2105108083 2105108083 IN IP4 10.10.1.1 s=Asterisk PBX 13.23.1 c=IN IP4 10.10.1.1 t=0 0 m=audio 10040 RTP/AVP 0 8 3 107 101 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:3 GSM/8000 a=rtpmap:107 opus/48000/2 a=fmtp:107 useinbandfec=1 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=maxptime:20 a=sendrecv

--end msg-- [08:52:28.999][t:8][p:1][pjsip][debug] Incoming Request msg INVITE/cseq=102 (rdata0x7f7944011018) [08:52:29.000][t:8][p:1][pjsip][debug] Call 46: initializing media.. [08:52:29.000][t:8][p:1][pjsip][debug] RTP socket reachable at 10.10.1.2:4348 [08:52:29.000][t:8][p:1][pjsip][debug] RTCP socket reachable at 10.10.1.2:4349 [08:52:29.000][t:8][p:1][pjsip][debug] Media index 0 selected for audio call 46 [08:52:29.000][t:8][p:1][core][debug] incoming SIP call #46 from "XXXXXXX XXXXXXXX" sip:250@10.10.1.1 to sip:tg%23XXXXXXXXXXXXXXX@10.10.1.2 with call-id 6fb55cc40eacfc4e30806e5a32fc0d8b@10.10.1.1:5060 [08:52:29.000][t:8][p:1][pjsip][debug] Call 46 hanging up: code=0.. [08:52:29.000][t:8][p:1][pjsip][debug] Pending call 46 hangup upon completion of media transport [08:52:29.000][t:8][p:1][pjsip][debug] Call 46 hanging up: code=500.. [08:52:29.000][t:8][p:1][pjsip][debug] Pending call 46 hangup upon completion of media transport [08:52:29.000][t:8][p:1][pjsip][debug] TX 289 bytes Response msg 100/INVITE/cseq=102 (tdta0x7f7944021e78) to UDP 10.10.1.1:5060: SIP/2.0 100 Trying Via: SIP/2.0/UDP 10.10.1.1:5060;received=10.10.1.1;branch=z9hG4bK07e289ec Call-ID: 6fb55cc40eacfc4e30806e5a32fc0d8b@10.10.1.1:5060 From: "XXXXXXX XXXXXXXX" sip:250@10.10.1.1;tag=as1132a0f1 To: sip:tg%23XXXXXXXXXXXXXXX@10.10.1.2 CSeq: 102 INVITE Content-Length: 0

--end msg-- [08:52:29.000][t:8][p:1][pjsip][debug] Call 46 hanging up: code=500.. [08:52:29.000][t:8][p:1][pjsip][debug] TX 320 bytes Response msg 500/INVITE/cseq=102 (tdta0x7f7944029698) to UDP 10.10.1.1:5060: SIP/2.0 500 Via: SIP/2.0/UDP 10.10.1.1:5060;received=10.10.1.1;branch=z9hG4bK07e289ec Call-ID: 6fb55cc40eacfc4e30806e5a32fc0d8b@10.10.1.1:5060 From: "XXXXXXX XXXXXXXX" sip:250@10.10.1.1;tag=as1132a0f1 To: sip:tg%23XXXXXXXXXXXXXXX@10.10.1.2;tag=oVrJ5eT6cJ84e4QUZ4sXiOKZqiwYDzih CSeq: 102 INVITE Content-Length: 0

--end msg-- [08:52:29.000][t:8][p:1][pjsip][debug] Call 46: deinitializing media.. [08:52:29.000][t:8][p:1][pjsip][debug] Call 46: cleaning up provisional media, prov_med_cnt=1, med_cnt=0 [08:52:29.001][t:8][p:1][pjsip][debug] RX 410 bytes Request msg ACK/cseq=102 (rdata0x7f7944011018) from UDP 10.10.1.1:5060: ACK sip:tg%23XXXXXXXXXXXXXXX@10.10.1.2 SIP/2.0 Via: SIP/2.0/UDP 10.10.1.1:5060;branch=z9hG4bK07e289ec Max-Forwards: 70 From: "XXXXXXX XXXXXXXX" sip:250@10.10.1.1;tag=as1132a0f1 To: sip:tg%23XXXXXXXXXXXXXXX@10.10.1.2;tag=oVrJ5eT6cJ84e4QUZ4sXiOKZqiwYDzih Contact: sip:250@10.10.1.1:5060 Call-ID: 6fb55cc40eacfc4e30806e5a32fc0d8b@10.10.1.1:5060 CSeq: 102 ACK User-Agent: Asterisk PBX 13.23.1 Content-Length: 0

--end msg-- [08:52:29.008][t:1][p:1][core][debug] [1-390] associated with SIP#46 [08:52:29.008][t:1][p:1][core][debug] [1-390] setting SIP #46 in ringing mode [08:52:29.008][t:1][p:1][pjsip][debug] Answering call 46: code=180 [08:52:29.008][t:1][p:1][pjsip][info] Invalid call_id 46 in pjsua_call_answer() [08:52:29.008][t:1][p:1][pjsip][error] pjsua_call_answer2(id, param.p_opt, prm.statusCode, param.p_reason, param.p_msg_data) error: INVITE session already terminated (PJSIP_ESESSIONTERMINATED) (status=171140) [../src/pjsua2/call.cpp:582] [08:52:29.018][t:1][p:1][pjsip][debug] Call 46 hanging up: code=500.. [08:52:29.018][t:1][p:1][pjsip][info] Invalid call_id 46 in pjsua_call_hangup() [08:52:29.018][t:1][p:1][pjsip][error] pjsua_call_hangup(id, prm.statusCode, param.p_reason, param.p_msg_data) error: INVITE session already terminated (PJSIP_ESESSIONTERMINATED) (status=171140) [../src/pjsua2/call.cpp:591] [08:52:29.018][t:1][p:1][core][error] INVITE session already terminated (PJSIP_ESESSIONTERMINATED)

Infactum commented 5 years ago

Could you provide logs from SIP PBX side?

minchik commented 5 years ago

Unfortunately debug mode was not enabled on PBX. There was something about 500 error code in asterisk cli. I'll provide additional information if this error will repeat in the future. Thanks

Infactum commented 5 years ago

Closed as non-reproducible