Freepbx pjsip trunk probleme

I have configured a pjsip trunk on two freepbx servers. From the first server to the second and from the second to the first. The configuration looks identical on both, but the connection only works in one direction. Does anyone have an idea why this might be and where to start verifying?

Have you done a fwconsole restart and a fwconsole reload after touching pjsip settings?

Yes by clicking Apply Changes. I see in logs in second server that connection is established but the phone is not ringing.

Those are logs i talking about:
2755 [2024-11-05 12:47:31] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@from-internal:1] Answer(“PJSIP/Test-Trunk-0000008b”, “”) in new stack
2756 [2024-11-05 12:47:31] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@from-internal:2] Wait(“PJSIP/Test-Trunk-0000008b”, “1”) in new stack
2757 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@from-internal:3] Gosub(“PJSIP/Test-Trunk-0000008b”, “macro-user-callerid,s,1()”) in new stack
2758 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:1] Set(“PJSIP/Test-Trunk-0000008b”, “TOUCH_MONITOR=1730807251.201”) in new stack
2759 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:2] Set(“PJSIP/Test-Trunk-0000008b”, “CHANCONTEXT=”) in new stack
2760 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:3] Progress(“PJSIP/Test-Trunk-0000008b”, “”) in new stack
2761 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:4] Set(“PJSIP/Test-Trunk-0000008b”, “CHANCONTEXT=”) in new stack
2762 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:5] Set(“PJSIP/Test-Trunk-0000008b”, “CHANEXTENCONTEXT=Test-Trunk-0000008b”) in new stack
2763 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:6] Set(“PJSIP/Test-Trunk-0000008b”, “CHANEXTEN=Test-Trunk-0000008b”) in new stack
2764 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:7] Set(“PJSIP/Test-Trunk-0000008b”, “CALLERID(number)=102”) in new stack
2765 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:8] Set(“PJSIP/Test-Trunk-0000008b”, “AMPUSER=102”) in new stack
2766 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:9] Set(“PJSIP/Test-Trunk-0000008b”, “HOTDESCKCHAN=Test-Trunk-0000008b”) in new stack
2767 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:10] Set(“PJSIP/Test-Trunk-0000008b”, “HOTDESKEXTEN=Test-Trunk”) in new stack
2768 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:11] Set(“PJSIP/Test-Trunk-0000008b”, “HOTDESKCALL=0”) in new stack
2769 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:12] ExecIf(“PJSIP/Test-Trunk-0000008b”, “0?Set(HOTDESKCALL=1)”) in new stack
2770 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:13] ExecIf(“PJSIP/Test-Trunk-0000008b”, “0?Set(CALLERID(name)=)”) in new stack
2771 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:14] GotoIf(“PJSIP/Test-Trunk-0000008b”, “0?report”) in new stack
2772 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:15] ExecIf(“PJSIP/Test-Trunk-0000008b”, “1?Set(REALCALLERIDNUM=102)”) in new stack
2773 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:16] Set(“PJSIP/Test-Trunk-0000008b”, “AMPUSER=”) in new stack
2774 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:17] GotoIf(“PJSIP/Test-Trunk-0000008b”, “0?limit”) in new stack
2775 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:18] Set(“PJSIP/Test-Trunk-0000008b”, “AMPUSERCIDNAME=”) in new stack
2776 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:19] ExecIf(“PJSIP/Test-Trunk-0000008b”, “0?Set(__CIDMASQUERADING=TRUE)”) in new stack
2777 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:20] GotoIf(“PJSIP/Test-Trunk-0000008b”, “1?report”) in new stack
2778 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx_builtins.c: Goto (macro-user-callerid,s,29)
2779 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:29] NoOp(“PJSIP/Test-Trunk-0000008b”, “Macro depricated!! To keep the same line numbers”) in new stack
2780 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:30] NoOp(“PJSIP/Test-Trunk-0000008b”, “Macro depricated !! To keep the same line numbers”) in new stack
2781 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:31] GotoIf(“PJSIP/Test-Trunk-0000008b”, “0?continue”) in new stack
2782 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:32] ExecIf(“PJSIP/Test-Trunk-0000008b”, “1?Set(__CALLEE_ACCOUNCODE=)”) in new stack
2783 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:33] Set(“PJSIP/Test-Trunk-0000008b”, “__TTL=64”) in new stack
2784 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:34] GotoIf(“PJSIP/Test-Trunk-0000008b”, “1?continue”) in new stack
2785 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx_builtins.c: Goto (macro-user-callerid,s,50)
2786 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:50] Set(“PJSIP/Test-Trunk-0000008b”, “CALLERID(number)=102”) in new stack
2787 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:51] Set(“PJSIP/Test-Trunk-0000008b”, “CALLERID(name)=Adrian Pyszny FLY”) in new stack
2788 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:52] GotoIf(“PJSIP/Test-Trunk-0000008b”, “0?cnum”) in new stack
2789 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:53] Set(“PJSIP/Test-Trunk-0000008b”, “__MCNUM=102”) in new stack
2790 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:54] Set(“PJSIP/Test-Trunk-0000008b”, “__MCNAME=Adrian Pyszny FLY”) in new stack
2791 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:55] Set(“PJSIP/Test-Trunk-0000008b”, “__MCEXTEN=”) in new stack
2792 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:56] Set(“PJSIP/Test-Trunk-0000008b”, “__MCORGCHAN=PJSIP/Test-Trunk-0000008b”) in new stack
2793 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:57] Set(“PJSIP/Test-Trunk-0000008b”, “CDR(cnam)=Adrian Pyszny FLY”) in new stack
2794 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:58] Set(“PJSIP/Test-Trunk-0000008b”, “CDR(cnum)=102”) in new stack
2795 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-user-callerid:59] Return(“PJSIP/Test-Trunk-0000008b”, “”) in new stack
2796 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@from-internal:4] GotoIf(“PJSIP/Test-Trunk-0000008b”, “0?activate”) in new stack
2797 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@from-internal:5] GotoIf(“PJSIP/Test-Trunk-0000008b”, “0?deactivate:end”) in new stack
2798 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx_builtins.c: Goto (from-internal,s,10)
2799 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@from-internal:10] Gosub(“PJSIP/Test-Trunk-0000008b”, “macro-hangupcall,s,1()”) in new stack
2800 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-hangupcall:1] Set(“PJSIP/Test-Trunk-0000008b”, “__MCVMSTATUS=”) in new stack
2801 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-hangupcall:2] Gosub(“PJSIP/Test-Trunk-0000008b”, “app-missedcall-hangup,s,1()”) in new stack
2802 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@app-missedcall-hangup:1] NoOp(“PJSIP/Test-Trunk-0000008b”, “Dialed: s”) in new stack
2803 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@app-missedcall-hangup:2] NoOp(“PJSIP/Test-Trunk-0000008b”, "Caller: ") in new stack
2804 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@app-missedcall-hangup:3] GotoIf(“PJSIP/Test-Trunk-0000008b”, “0?exit”) in new stack
2805 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@app-missedcall-hangup:4] Set(“PJSIP/Test-Trunk-0000008b”, “EXTENNUM=s”) in new stack
2806 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@app-missedcall-hangup:5] Set(“PJSIP/Test-Trunk-0000008b”, “FEXTENNUM=s”) in new stack
2807 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@app-missedcall-hangup:6] GotoIf(“PJSIP/Test-Trunk-0000008b”, “0?exit”) in new stack
2808 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@app-missedcall-hangup:7] AGI(“PJSIP/Test-Trunk-0000008b”, “agi://127.0.0.1/missedcallnotify.php,s,s,0,PJSIP/Test-Trunk-0000008b,”) in new stack
2809 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] res_agi.c: <PJSIP/Test-Trunk-0000008b>AGI Script agi://127.0.0.1/missedcallnotify.php completed, returning 0
2810 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@app-missedcall-hangup:8] Return(“PJSIP/Test-Trunk-0000008b”, “”) in new stack
2811 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-hangupcall:3] UserEvent(“PJSIP/Test-Trunk-0000008b”, “MES,RTPAUDIOQOSMESBRIDGED:,RTPAUDIOQOSMES:”) in new stack
2812 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-hangupcall:4] GotoIf(“PJSIP/Test-Trunk-0000008b”, “1?theend”) in new stack
2813 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx_builtins.c: Goto (macro-hangupcall,s,6)
2814 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-hangupcall:6] ExecIf(“PJSIP/Test-Trunk-0000008b”, “0?Set(CDR(recordingfile)=)”) in new stack
2815 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Executing [s@macro-hangupcall:7] Hangup(“PJSIP/Test-Trunk-0000008b”, “”) in new stack
2816 [2024-11-05 12:47:32] VERBOSE[2077887][C-00000065] pbx.c: Spawn extension (macro-hangupcall, s, 7) exited non-zero on ‘PJSIP/Test-Trunk-0000008b’

Im using freepbx 16 (first server) and 17 (second server)

The call arrives without any dial digits so defaults to ‘s’. I expect you’ve got bad dial rules on the originating system either trunk or outbound routes.

I am calling 6017 number and i have this dial patterns in Outbound Routes:


In logs i can see that traffic is getting by correct trunk.
Is my outbound route is correct?

I dont know what is dial rules on the originating system. Could You tell me more about this?