It's called "glare" if you have FXO trunks (and I'm assuming that you are, as this problem doesn't exist normally for other types of trunk) and the incoming call come in line1, line2, line3, etc. and the outgoing calls go out in the same order, then there are points in time when the state of the line is undefined (on hook, off hook, ringing). either reorder the lines (in reverse) or define and use group G0 instead of group g0 in your outbound routes, to minimize this effect.
You can do almost anything from bash but as you are a "newbie" then:
They are defined in /etc/asterisk/dahdi_channels.conf but as long as there is dial tone on all your trunks so defined in that file, then G0 is already there and usable (G and g,r and R are metadata used to describe how asterisk uses channels in groups. G0 is just g0 upside down, r and R are not generally useful they use the trunks "round-robin") to use G0 just add in FreePBX a zap/dahdi trunk and call it G0, that's all folks!!