Calls have no sound and disconnect after 32 seconds

Hi,

i setup FreePBX with Asterisk on my Raspberry Pi 3.
I used RasPBX which you can download here.
I can call each other phone but there is not sound and they disconnect after exactly 32 seconds.
The Calls are local so NAT is not the problem.

My CLI output

Connected to Asterisk 16.6.1 currently running on raspbx (pid = 1057)
  == Setting global variable 'SIPDOMAIN' to 'X.X.X.X'
  == Setting global variable 'SIPDOMAIN' to 'X.X.X.X'
    -- Executing [802@from-internal:1] Dial("PJSIP/803-00000000", "PJSIP/802,20") in new stack
    -- Called PJSIP/802
    -- PJSIP/802-00000001 is ringing
    -- PJSIP/802-00000001 is ringing
    -- PJSIP/802-00000001 answered PJSIP/803-00000000
       > 0x2572628 -- Strict RTP learning after remote address set to: X.X.X.1:16390
       > 0x2569d38 -- Strict RTP learning after remote address set to: X.X.X.2:16390
    -- Channel PJSIP/802-00000001 joined 'simple_bridge' basic-bridge <4b89584a-7a18-441d-9e47-04b3f2c0bbaf>
    -- Channel PJSIP/803-00000000 joined 'simple_bridge' basic-bridge <4b89584a-7a18-441d-9e47-04b3f2c0bbaf>
       > 0x2569d38 -- Strict RTP switching to RTP target address X.X.X.2:16390 as source
       > 0x2572628 -- Strict RTP switching to RTP target address X.X.X.1:16390 as source
       > 0x2569d38 -- Strict RTP learning complete - Locking on source address X.X.X.2:16390
       > 0x2572628 -- Strict RTP learning complete - Locking on source address X.X.X.1:16390
    -- Channel PJSIP/803-00000000 left 'simple_bridge' basic-bridge <4b89584a-7a18-441d-9e47-04b3f2c0bbaf>
    -- Channel PJSIP/802-00000001 left 'simple_bridge' basic-bridge <4b89584a-7a18-441d-9e47-04b3f2c0bbaf>
  == Spawn extension (from-internal, 802, 1) exited non-zero on 'PJSIP/803-00000000'
    -- Executing [h@from-internal:1] Macro("PJSIP/803-00000000", "hangupcall") in new stack
[2020-01-28 07:10:09] WARNING[1733][C-00000001]: app_macro.c:274 _macro_exec: Macro() is deprecated and will be removed from a future version of Asterisk.
[2020-01-28 07:10:09] WARNING[1733][C-00000001]: app_macro.c:275 _macro_exec: Dialplan should be updated to use Gosub instead.
    -- Executing [s@macro-hangupcall:1] GotoIf("PJSIP/803-00000000", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [s@macro-hangupcall:3] ExecIf("PJSIP/803-00000000", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [s@macro-hangupcall:4] NoOp("PJSIP/803-00000000", "PJSIP/802-00000001 montior file= ") in new stack
    -- Executing [s@macro-hangupcall:5] GotoIf("PJSIP/803-00000000", "1?skipagi") in new stack
    -- Goto (macro-hangupcall,s,7)
    -- Executing [s@macro-hangupcall:7] Hangup("PJSIP/803-00000000", "") in new stack
  == Spawn extension (macro-hangupcall, s, 7) exited non-zero on 'PJSIP/803-00000000' in macro 'hangupcall'
  == Spawn extension (from-internal, h, 1) exited non-zero on 'PJSIP/803-00000000'
raspbx*CLI>

PjSIP debugger output
from ringing to disconnect
https://pastebin.freepbx.org/view/8714209a

Could you append SIP Packet?

you mean the sip.conf ?

What kind of endpoint are you using? It (sip:802@h.o.s.t) appears it is not responding with an ACK to the 200 OK (can see a bunch of retransmissions), so the “call” doesn’t finish getting setup and eventually times out.

But I think the problem starts before that. Every invite from the endpoint has the same call-id, but the second one in response to the auth challenge is rejected with a 488. So I wonder if the endpoint closes the dialog on its end at that point, but it appears it then sends a re-invite right after that. Which Asterisk tries to use to setup the call.

here is my pjsip.conf

[global]
type=global
user_agent=FPBX-15.0.16.22(16.5.0)
#include pjsip_custom_post.conf

[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0

;Templates for the necessary config sections

[endpoint_internal](!)
type=endpoint
context=from-internal
disallow=all
allow=ulaw

[auth_userpass](!)
type=auth
auth_type=userpass

[aor_dynamic](!)
type=aor
max_contacts=1

[802](endpoint_internal)
auth=802
aors=802
[802](auth_userpass)
password=secret
username=802
[802](aor_dynamic)

[803](endpoint_internal)
auth=803
aors=803
[803](auth_userpass)
password=secret
username=803
[803](aor_dynamic)

From the log it appears Asterisk is rejecting the initial INVITE. See “SIP/2.0 488 Not Acceptable Here”. Is your phone sending the correct authentication information?

Also once rejected why does the phone send another INVITE with the same Call-ID:

Call-ID: d5c98b0a28305e01e3950090333007f2@ph.on.e.1

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.