New install only allows two trunks

Hi there…I installed yet again from scratch using the ISO and this time I can only get two trunks to show up in Asterisk info YET they show up in the outbound routes.

it looks like the database might be out of sync with reality?

Is there a way to regenerate the database from the config?

As an aside the PJSIP issues I am having start to show up after 22hours or so with this install with endpoints dropping out again. :frowning:

Any ideas how to get the trunks working?

I upgraded freepbx but have not upgraded asterisk at this time.

Leon

fwconsole reload

You can also search /etc/asterisk for your configuration.

That didnt work nor does many reobots.

ASTERISK INFO:

Chan_Sip Peers

Name/username Host Dyn Forcerport Comedia ACL Port Status Description
90701 (Unspecified) D No No A 0 UNKNOWN
vitel-inbound/xxxx_nyc 64.x.y.z No No 5060 OK (45 ms)
vitel-out/xxxx_nyc 64.a.b.c No No 5060 OK (54 ms)
voipms/111111_NYC 107.x.y.z No No 5060 OK (2 ms)
4 sip peers [Monitored: 3 online, 1 offline Unmonitored: 0 online, 0 offline]

TRUNKS DEFINED:

Actions
AlcazarTollFree sip “BackWoods Wireless” <484NXXXXXX> Enabled
Vitelity sip “BackWoods Wireless” <484NXXXXXX> Enabled
VoIPms sip “BackWoods Wireless” <484NXXXXXX> Enabled

OUTBOUND ROUTES:

DirAsst
TollFree
Default

just did a fwconeole validate --clean

[[email protected] ~]# fwconsole validate --clean
Downloading…

============================
This script will check your system to the best of it’s ability
It should not be relied upon for complete validation
Every hack is different. This just tries to discover and clean them up as best as possible
Continue with this action?y
Scanning All files…
Scanning All files…
[============================] 5 secs
Found /var/www/html/admin/modules/xmpp/node/package-lock.json that shouldn’t be there?
Purged File
Found /var/www/html/admin/modules/framework/utests/CronTest.php that shouldn’t be there?
Purged File
Found /var/www/html/admin/modules/framework/utests/genaccts.php that shouldn’t be there?
Purged File
Found /var/www/html/admin/modules/framework/utests/LoadConfigTest.php that shouldn’t be there?
Purged File
Found /var/www/html/admin/modules/framework/utests/RealtimeTest.php that shouldn’t be there?
Purged File
Found /var/www/html/admin/modules/framework/utests/UpdatesTest.php that shouldn’t be there?
Purged File
Found /var/www/html/admin/modules/framework/utests/DBHelperTest.php that shouldn’t be there?
Purged File
Found /var/www/html/admin/modules/framework/utests/FwconsoleTest.php that shouldn’t be there?
Purged File
Found /var/www/html/admin/modules/framework/utests/PKCSTest.php that shouldn’t be there?
Purged File
Found /var/www/html/admin/modules/framework/utests/WebTest.php that shouldn’t be there?
Purged File
Found /var/www/html/admin/modules/framework/utests/ModulesTest.php that shouldn’t be there?
Purged File
Found /var/www/html/admin/modules/framework/utests/AstmanTest.php that shouldn’t be there?
Purged File
Found /var/www/html/admin/modules/framework/utests/GPGTest.php that shouldn’t be there?
Purged File
Found /var/www/html/admin/modules/framework/utests/PHPTest.php that shouldn’t be there?
Purged File
Found /var/www/html/admin/modules/framework/utests/ViewsTest.php that shouldn’t be there?
Purged File
Found /var/www/html/admin/modules/framework/utests/MailTest.php that shouldn’t be there?
Purged File
Found /var/www/html/admin/modules/framework/utests/InstallerTest.php that shouldn’t be there?
Purged File
Found /var/www/html/admin/modules/framework/utests/RequestTest.php that shouldn’t be there?
Purged File
Found /var/www/html/admin/modules/framework/utests/DoctrineTest.php that shouldn’t be there?
Purged File
Found /var/www/html/admin/modules/userman/vendor/adldap2/adldap2/.github/issue_template.md that shouldn’t be there?
Purged File
Found /var/www/html/admin/modules/cxpanel/main.log that shouldn’t be there?
Purged File
Found /var/www/html/admin/modules/cxpanel/modify.log that shouldn’t be there?
Purged File
Found /var/www/html/admin/modules/ucp/htdocs/vendor/oyejorge/less.php/lib/Less/.easymin/ignore_prefixes that shouldn’t be there?
Purged File
Found /var/www/html/admin/modules/ucp/node/package-lock.json that shouldn’t be there?
Purged File
Found /var/www/html/admin/modules/zulu/node/package-lock.json that shouldn’t be there?
Purged File
Purging PHP Session storage
Moving potentially compromised file /etc/asterisk/manager_custom.conf to /tmp/freepbx_quarantine/manager_custom.conf
Moving potentially compromised file /etc/asterisk/sip_custom.conf to /tmp/freepbx_quarantine/sip_custom.conf
Moving potentially compromised file /etc/asterisk/extensions_custom.conf to /tmp/freepbx_quarantine/extensions_custom.conf
Connecting to the PBX…Connected
Finished
[[email protected] ~]#

here is the trunk that doesnt show up…it is only an outbound trunk. the inbound settings are EMPTY

snippet from /etc/asterisk/extensions_additional.conf

[from-trunk-sip-voipms]
include => from-trunk-sip-voipms-custom
exten => _.,1,Set(GROUP()=OUT_1)
exten => _.,n,Goto(from-trunk,${EXTEN},1)

;–== end of [from-trunk-sip-voipms] ==–;

[ext-trunk]
include => ext-trunk-custom
exten => 1,1,Set(TDIAL_STRING=SIP/voipms)
exten => 1,n,Set(DIAL_TRUNK=1)
exten => 1,n,Goto(ext-trunk,tdial,1)

exten => 2,1,Set(TDIAL_STRING=SIP/vitel-out)
exten => 2,n,Set(DIAL_TRUNK=2)
exten => 2,n,Goto(ext-trunk,tdial,1)

exten => 3,1,Set(TDIAL_STRING=SIP/AlcazarTollFree)
exten => 3,n,Set(DIAL_TRUNK=3)
exten => 3,n,Goto(ext-trunk,tdial,1)

exten => tdial,1,Set(OUTBOUND_GROUP=OUT_${DIAL_TRUNK})
exten => tdial,n,GotoIf($["${OUTMAXCHANS_${DIAL_TRUNK}}" = “”]?nomax)
exten => tdial,n,GotoIf($[${GROUP_COUNT(OUT_${DIAL_TRUNK})} >= ${OUTMAXCHANS_${DIAL_TRUNK}}]?hangit)
exten => tdial,n(nomax),ExecIf($["${CALLINGNAMEPRES_SV}" != “”]?Set(CALLERPRES(name-pres)=${CALLINGNAMEPRES_SV}))
exten => tdial,n,ExecIf($["${CALLINGNUMPRES_SV}" != “”]?Set(CALLERPRES(num-pres)=${CALLINGNUMPRES_SV}))
exten => tdial,n,Set(DIAL_NUMBER=${FROM_DID})
exten => tdial,n,GosubIf($["${PREFIX_TRUNK_${DIAL_TRUNK}}" != “”]?sub-flp-${DIAL_TRUNK},s,1())
exten => tdial,n,Set(OUTNUM=${OUTPREFIX_${DIAL_TRUNK}}${DIAL_NUMBER})
exten => tdial,n,Set(DIAL_TRUNK_OPTIONS=${IF($["${DB_EXISTS(TRUNK/${DIAL_TRUNK}/dialopts)}" = “1”]?${DB_RESULT}:${TRUNK_OPTIONS})})
exten => tdial,n,Set(CALLERID(number)=${CALLERID(number):0:40})
exten => tdial,n,Set(CALLERID(name)=${CALLERID(name):0:40})
exten => tdial,n(hangit),Hangup

;–== end of [ext-trunk] ==–;

[from-trunk-sip-vitel-out]
include => from-trunk-sip-vitel-out-custom
exten => _.,1,Set(GROUP()=OUT_2)
exten => _.,n,Goto(from-trunk,${EXTEN},1)

;–== end of [from-trunk-sip-vitel-out] ==–;

[from-trunk-sip-AlcazarTollFree]
include => from-trunk-sip-AlcazarTollFree-custom
exten => _.,1,Set(GROUP()=OUT_3)
exten => _.,n,Goto(from-trunk,${EXTEN},1)

;–== end of [from-trunk-sip-AlcazarTollFree] ==–;

If you have anything in the inbound trunk name but an empty user configuration text box, this will happen. It will generate an error on reload, in the Asterisk full log.

1 Like

Bill pretty much pointed out the issue. Also there was no reason at all to run validate or post the log from it here.

@billsimon: the entire inbound tab is empty, no name, no peer settings so it shouldn’t use it? I had it this way previously and it worked? This is an outbound only trunk.

@tm1000: I was just trying the various commands. So how does one create an outbound only trunk officially?

Thanks leon

Did you search all of etc asterisk or just extensions_additional

yes and couldnt find the trunk definitions. BUT if I am using FreePBX to define everything I should NOT have to edit conf files to make things work

changing the outbound to TYPE=FRIEND fixed it. dunno why it worked previous.

I never said you had to edit any configuration file. I merely asked you to look. Which is an important step in troubleshooting. Sorry for asking.

@tm1000: Sorry bout that I took your comment the wrong way. Thanks for the assist.