I have a strange issue on our FreePBX since i upgraded it from FreepBX 14 to 16 with a import of the last configuration. This is now around half a year ago. Because of my custom own snom provisioning scripts and other stuff we don’t migrated to FreePBX 17 yet. We use Asterisk 16.
Since then we had the issue that always after around 30 minutes calls are terminated or one or both on the phone call are set to “on hold” and hear the waiting music. But i also have calls with an hour or longer.
Ex. in the CDR Report i see “ANSWER” and “BRIDGE_ENTER” arond 16.09 and then 16:39 a “BRIDGE_EXIT” short after then “HANGUP” But none has ended the call.
In the log it looks like around after half an hour:
[2026-01-15 16:09:08] VERBOSE[26634][C-000082ee] pbx.c: Executing [s@macro-auto-blkvm:7] Macro(“PJSIP/XXXXX10-0001725d”, “blkvm-clr,”) in new stack
[2026-01-15 16:09:08] VERBOSE[26634][C-000082ee] pbx.c: Executing [s@macro-blkvm-clr:1] Set(“PJSIP/XXXXX10-0001725d”, “SHARED(BLKVM,PJSIP/4144XXXXXXX-00017256)=”) in new stack
[2026-01-15 16:09:08] VERBOSE[26634][C-000082ee] pbx.c: Executing [s@macro-blkvm-clr:2] Set(“PJSIP/XXXXX10-0001725d”, “GOSUB_RETVAL=”) in new stack
[2026-01-15 16:09:08] VERBOSE[26634][C-000082ee] pbx.c: Executing [s@macro-blkvm-clr:3] MacroExit(“PJSIP/XXXXX10-0001725d”, “”) in new stack
[2026-01-15 16:09:08] VERBOSE[26634][C-000082ee] pbx.c: Executing [s@macro-auto-blkvm:8] ExecIf(“PJSIP/XXXXX10-0001725d”, “0?Set(MASTER_CHANNEL(CONNECTEDLINE(num))=XXXXX10/sip:[email protected]:55068;transport=TCP;rinstance=12d6539a5eb912da)”) in new stack
[2026-01-15 16:09:08] VERBOSE[26634][C-000082ee] pbx.c: Executing [s@macro-auto-blkvm:9] ExecIf(“PJSIP/XXXXX10-0001725d”, “0?Set(MASTER_CHANNEL(CONNECTEDLINE(name))=)”) in new stack
[2026-01-15 16:09:08] VERBOSE[26740][C-000082ee] bridge_channel.c: Channel PJSIP/XXXXX10-0001725d joined ‘simple_bridge’ basic-bridge <8eb50600-7794-4f94-9841-dca903d874dd>
[2026-01-15 16:09:08] VERBOSE[26634][C-000082ee] bridge_channel.c: Channel PJSIP/4144XXXXXXX-00017256 joined ‘simple_bridge’ basic-bridge <8eb50600-7794-4f94-9841-dca903d874dd>
[2026-01-15 16:39:07] VERBOSE[26634][C-000082ee] res_musiconhold.c: Started music on hold, class ‘default’, on channel ‘PJSIP/4144XXXXXXX-00017256’
[2026-01-15 16:39:58] VERBOSE[26740][C-000082ee] bridge_channel.c: Channel PJSIP/XXXXX10-0001725d left ‘simple_bridge’ basic-bridge <8eb50600-7794-4f94-9841-dca903d874dd>
[2026-01-15 16:39:58] VERBOSE[26740][C-000082ee] app_stack.c: PJSIP/XXXXX10-0001725d Internal Gosub(app-missedcall-hangup,XXXXX10,1) start
[2026-01-15 16:39:58] VERBOSE[26740][C-000082ee] pbx.c: Executing [XXXXX10@app-missedcall-hangup:1] NoOp(“PJSIP/XXXXX10-0001725d”, “Dialed: XXXXX10”) in new stack
[2026-01-15 16:39:58] VERBOSE[26740][C-000082ee] pbx.c: Executing [XXXXX10@app-missedcall-hangup:2] NoOp(“PJSIP/XXXXX10-0001725d”, "Caller: ") in new stack
[2026-01-15 16:39:58] VERBOSE[26740][C-000082ee] pbx.c: Executing [XXXXX10@app-missedcall-hangup:3] GotoIf(“PJSIP/XXXXX10-0001725d”, “0?exit”) in new stack
[2026-01-15 16:39:58] VERBOSE[26740][C-000082ee] pbx.c: Executing [XXXXX10@app-missedcall-hangup:4] Set(“PJSIP/XXXXX10-0001725d”, “EXTENNUM=XXXXX10”) in new stack
[2026-01-15 16:39:58] VERBOSE[26740][C-000082ee] pbx.c: Executing [XXXXX10@app-missedcall-hangup:5] Set(“PJSIP/XXXXX10-0001725d”, “FEXTENNUM=XXXXX10”) in new stack
[2026-01-15 16:39:58] VERBOSE[26740][C-000082ee] pbx.c: Executing [XXXXX10@app-missedcall-hangup:6] GotoIf(“PJSIP/XXXXX10-0001725d”, “0?exit”) in new stack
[2026-01-15 16:39:58] VERBOSE[26740][C-000082ee] pbx.c: Executing [XXXXX10@app-missedcall-hangup:7] AGI(“PJSIP/XXXXX10-0001725d”, “agi://127.0.0.1/missedcallnotify.php,XXXXX10,XXXXX10,0,PJSIP/XXXXX10-0001725d,8807227,”) in new stack
[2026-01-15 16:39:58] VERBOSE[26634][C-000082ee] bridge_channel.c: Channel PJSIP/4144XXXXXXX-00017256 left ‘simple_bridge’ basic-bridge <8eb50600-7794-4f94-9841-dca903d874dd>
[2026-01-15 16:39:58] VERBOSE[26634][C-000082ee] res_musiconhold.c: Stopped music on hold on PJSIP/4144XXXXXXX-00017256
[2026-01-15 16:39:58] VERBOSE[26634][C-000082ee] app_macro.c: Spawn extension (macro-dial, s, 30) exited non-zero on ‘PJSIP/4144XXXXXXX-00017256’ in macro ‘dial’
[2026-01-15 16:39:58] VERBOSE[26634][C-000082ee] pbx.c: Spawn extension (ext-group, 8807227, 19) exited non-zero on ‘PJSIP/4144XXXXXXX-00017256’
[2026-01-15 16:39:58] VERBOSE[26634][C-000082ee] pbx.c: Executing [h@ext-group:1] Macro(“PJSIP/4144XXXXXXX-00017256”, “hangupcall,”) in new stack
[2026-01-15 16:39:58] VERBOSE[26634][C-000082ee] pbx.c: Executing [s@macro-hangupcall:1] Set(“PJSIP/4144XXXXXXX-00017256”, “__MCVMSTATUS=”) in new stack
[2026-01-15 16:39:58] VERBOSE[26634][C-000082ee] pbx.c: Executing [s@macro-hangupcall:2] Gosub(“PJSIP/4144XXXXXXX-00017256”, “app-missedcall-hangup,s,1()”) in new stack
[2026-01-15 16:39:58] VERBOSE[26634][C-000082ee] pbx.c: Executing [s@app-missedcall-hangup:1] NoOp(“PJSIP/4144XXXXXXX-00017256”, “Dialed: s”) in new stack
I had a opnsense firewall in front of the freepbx, but i don’t changed anything in the configuration. The old and the new freepbx has the same ip as before and also the same port mappings, etc. on the firewall. the rule setting is on “conservative” (Tries to avoid dropping any legitimate idle connections at the expense of increased memory usage and CPU utilization.) .
The issue is with soft phones like “Zoipe5” but also with desk phones like snom’s.
What i already tried is changed timeout values and keep alive values on the freepbx.
The pjsip trunk has the following advanced settings. i already tried it with longer and shorted values
expiration 120, qualify frequency 120
The general sip settings are:
rtp timeout: 60, rtp hold timeout 600, rtp keep alive 60,
the pj sip chan settings are:
keep alive interval 90