Hello,
I’m unable to properly configure FreePBX/HT841 to be able to work for outgoing calls.
I tried tons of configs, and search the web, ask AI, I’m at the end of my legendary patience
Incoming call no issue easy to have it working, but outgoing is a nightmare.
Anyone success to do it ? I have seen post on this forum, but no real solution or working config posted.
All are on the last version/firmware.
It is probably something very stupid that I’ve missed or a Codec or ports constraints…
I have configured a PJSIP Trunk, and let the defaults ports on the HT841 (6060,2,4,6) for each FXO. Here it is the FXO2 where I use to test the config, I didn’t activate yet the others.
On the FreePBX server, PJSip port is on 5060.
The HT841 register successfully to FreePBX, incomming calls are OK, but when I try to call out I receive the message that the numert requested is not in service…
I have this error in FreePBX log line 1768, not sure if it is the real issue:
1740 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@sub-flp-3:4] Set(“PJSIP/227-00000015”, “DIAL_NUMBER=0789663322”) in new stack
1741 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@sub-flp-3:5] Return(“PJSIP/227-00000015”, “”) in new stack
1742 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@macro-dialout-trunk:18] Set(“PJSIP/227-00000015”, “OUTNUM=0789663322”) in new stack
1743 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@macro-dialout-trunk:19] Set(“PJSIP/227-00000015”, “custom=PJSIP”) in new stack
1744 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@macro-dialout-trunk:20] ExecIf(“PJSIP/227-00000015”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)”) in new stack
1745 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@macro-dialout-trunk:21] ExecIf(“PJSIP/227-00000015”, “0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))”) in new stack
1746 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@macro-dialout-trunk:22] ExecIf(“PJSIP/227-00000015”, “0?AGI(allowlist-autoadd.agi,)”) in new stack
1747 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@macro-dialout-trunk:23] Macro(“PJSIP/227-00000015”, “dialout-trunk-predial-hook,”) in new stack
1748 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“PJSIP/227-00000015”, “”) in new stack
1749 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@macro-dialout-trunk:24] GotoIf(“PJSIP/227-00000015”, “0?bypass,1”) in new stack
1750 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@macro-dialout-trunk:25] ExecIf(“PJSIP/227-00000015”, “1?Set(CONNECTEDLINE(num,i)=0789663322)”) in new stack
1751 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@macro-dialout-trunk:26] ExecIf(“PJSIP/227-00000015”, “1?Set(CONNECTEDLINE(name,i)=CID:9988777300)”) in new stack
1752 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@macro-dialout-trunk:27] ExecIf(“PJSIP/227-00000015”, “0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)9988777300)”) in new stack
1753 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@macro-dialout-trunk:28] GotoIf(“PJSIP/227-00000015”, “0?customtrunk”) in new stack
1754 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@macro-dialout-trunk:29] ExecIf(“PJSIP/227-00000015”, “0?Set(DIAL_TRUNK_OPTIONS=)”) in new stack
1755 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@macro-dialout-trunk:30] Set(“PJSIP/227-00000015”, “HASH(__SIPHEADERS,Alert-Info)=unset”) in new stack
1756 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@macro-dialout-trunk:31] Dial(“PJSIP/227-00000015”, “PJSIP/0789663322@9988777300,300,Tb(func-apply-sipheaders^s^1,(3))U(sub-send-obroute-email^0789663322^0789663322^3^1739450821^^9988777300)”) in new stack
1757 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] app_stack.c: PJSIP/9988777300-00000016 Internal Gosub(func-apply-sipheaders,s,1(3)) start
1758 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@func-apply-sipheaders:1] NoOp(“PJSIP/9988777300-00000016”, “Applying SIP Headers to channel PJSIP/9988777300-00000016”) in new stack
1759 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@func-apply-sipheaders:2] Set(“PJSIP/9988777300-00000016”, “localchan=9988777300-00000016”) in new stack
1760 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@func-apply-sipheaders:3] Set(“PJSIP/9988777300-00000016”, “DialMCEXT=9988777300”) in new stack
1761 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@func-apply-sipheaders:4] Set(“PJSIP/9988777300-00000016”, “CHANNEL(hangup_handler_push)=app-missedcall-hangup,9988777300,1”) in new stack
1762 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@func-apply-sipheaders:5] Set(“PJSIP/9988777300-00000016”, “TECH=PJSIP”) in new stack
1763 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@func-apply-sipheaders:6] Set(“PJSIP/9988777300-00000016”, “SIPHEADERKEYS=Alert-Info”) in new stack
1764 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@func-apply-sipheaders:7] While(“PJSIP/9988777300-00000016”, “1”) in new stack
1765 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@func-apply-sipheaders:8] Set(“PJSIP/9988777300-00000016”, “sipheader=unset”) in new stack
1766 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@func-apply-sipheaders:9] ExecIf(“PJSIP/9988777300-00000016”, “0?SIPRemoveHeader(Alert-Info:)”) in new stack
1767 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@func-apply-sipheaders:10] ExecIf(“PJSIP/9988777300-00000016”, “1?Set(PJSIP_HEADER(remove,Alert-Info)=)”) in new stack
1768 [2025-02-13 12:47:01] ERROR[7580] res_pjsip_header_funcs.c: No headers had been previously added to this session.
1769 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@func-apply-sipheaders:11] ExecIf(“PJSIP/9988777300-00000016”, “0?Set(sipheader=<127.0.0.1>;info=unset)”) in new stack
1770 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@func-apply-sipheaders:12] ExecIf(“PJSIP/9988777300-00000016”, “0?Set(sipheader=<127.0.0.1>unset)”) in new stack
1771 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@func-apply-sipheaders:13] ExecIf(“PJSIP/9988777300-00000016”, “0?SIPAddHeader(Alert-Info:unset)”) in new stack
1772 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@func-apply-sipheaders:14] ExecIf(“PJSIP/9988777300-00000016”, “0?Set(PJSIP_HEADER(add,Alert-Info)=unset)”) in new stack
1773 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@func-apply-sipheaders:15] EndWhile(“PJSIP/9988777300-00000016”, “”) in new stack
1774 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@func-apply-sipheaders:7] While(“PJSIP/9988777300-00000016”, “0”) in new stack
1775 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@func-apply-sipheaders:16] Return(“PJSIP/9988777300-00000016”, “”) in new stack
1776 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] app_stack.c: Spawn extension (from-pstn, 0789663322, 1) exited non-zero on ‘PJSIP/9988777300-00000016’
1777 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] app_stack.c: PJSIP/9988777300-00000016 Internal Gosub(func-apply-sipheaders,s,1(3)) complete GOSUB_RETVAL=
1778 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] app_dial.c: Called PJSIP/0789663322@9988777300
1779 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] app_stack.c: PJSIP/9988777300-00000016 Internal Gosub(app-missedcall-hangup,9988777300,1) start
1780 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [9988777300@app-missedcall-hangup:1] NoOp(“PJSIP/9988777300-00000016”, “Dialed: 9988777300”) in new stack
1781 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [9988777300@app-missedcall-hangup:2] NoOp(“PJSIP/9988777300-00000016”, “Caller: 227”) in new stack
1782 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [9988777300@app-missedcall-hangup:3] GotoIf(“PJSIP/9988777300-00000016”, “0?exit”) in new stack
1783 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [9988777300@app-missedcall-hangup:4] Set(“PJSIP/9988777300-00000016”, “EXTENNUM=9988777300”) in new stack
1784 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [9988777300@app-missedcall-hangup:5] Set(“PJSIP/9988777300-00000016”, “FEXTENNUM=9988777300”) in new stack
1785 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [9988777300@app-missedcall-hangup:6] GotoIf(“PJSIP/9988777300-00000016”, “0?exit”) in new stack
1786 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [9988777300@app-missedcall-hangup:7] AGI(“PJSIP/9988777300-00000016”, “missedcallnotify.php,9988777300,9988777300,0,PJSIP/9988777300-00000016,”) in new stack
1787 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/missedcallnotify.php
1788 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] res_agi.c: <PJSIP/9988777300-00000016>AGI Script missedcallnotify.php completed, returning 0
1789 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [9988777300@app-missedcall-hangup:8] Return(“PJSIP/9988777300-00000016”, “”) in new stack
1790 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] app_stack.c: Spawn extension (from-pstn, 0789663322, 1) exited non-zero on ‘PJSIP/9988777300-00000016’
1791 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] app_stack.c: PJSIP/9988777300-00000016 Internal Gosub(app-missedcall-hangup,9988777300,1) complete GOSUB_RETVAL=
1792 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] app_dial.c: Everyone is busy/congested at this time (1:0/0/1)
1793 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@macro-dialout-trunk:32] NoOp(“PJSIP/227-00000015”, “Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 1”) in new stack
1794 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s@macro-dialout-trunk:33] GotoIf(“PJSIP/227-00000015”, “0?continue,1:s-CHANUNAVAIL,1”) in new stack
1795 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx_builtins.c: Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
1796 [2025-02-13 12:47:01] VERBOSE[4486][C-0000000e] pbx.c: Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] Set(“PJSIP/227-00000015”, “RC=1”) in new stack
Any help is more than WELCOME