In some instances, a post dial delay is present when receiving inbound calls on a gateway, and trying to pass them out to a legacy PBX via BRI mISDN.
Usually, the caller will hear ringing for a long will before the legacy PBX starts ringing an extension.
This is usually the result of the Legacy PBX waiting for additional information that the Farsouth Networks gateway is not sending.
The PBX then delays the ringing until it times out, after which the call proceeds.
In order to prevent the legacy PBX from waiting for information that is not going to be sent, we need to send a SENDING_COMPLETE message to the PBX, that indicates that w have no further information to send, and to proceed with the call, rather than waiting.
Luckily, there is an existing piece of dialplan in /etc/asterisk/extensions_custom.conf that is perfectly positioned to add this dialplan customisation.
To add this line to your dialplan, follow the instructions below:
Once you are done editing, the macro-dialout-trunk-predial-hook should look as below:
[macro-dialout-trunk-predial-hook] exten => s,1,Set(pre_num=${CUT(OUT_${DIAL_TRUNK},$,1)}) exten => s,n,GotoIf($["${pre_num:0:9}" != "AMP:mISDN"]?notmisdn) exten => s,n,Set(misdn=${CUT(pre_num,/,2)}) exten => s,n,misdn_check_l2l1(${misdn},3) exten => s,n,Set(_MISDN_ADDRESS_COMPLETE=1) exten => s,n(notmisdn),NoOp() exten => s,n,GotoIf($["${ACCOUNTCODE}"==""]?notac) exten => s,n,ResetCDR() exten => s,n,Set(CDR(accountcode)=${ACCOUNTCODE}) exten => s,n(notac),MacroExit