LesD
Member
- Joined
- Nov 8, 2009
- Messages
- 408
- Reaction score
- 15
I am trying to get a script working properly to report a failed trunk so I set all my trunks to call this script in the Monitor-Trunk-Failures option.
I then discovered that I was getting delays/failures when using the Trunk-Balance module to alternate calls between two trunk lines.
I tracked this to what looks like a 50 second or so delay whenever an outbound route has two trunks defined and the first trunk fails. The 2nd trunk does not take over immediately.
Disabling the Monitor-Trunk-Failures option removes the delay.
Further tests showed that it was the final line in the script, which was sending the notification email, that caused the delay. If that was commented out then there was no noticeable delay. I have not checked the logs but it seems obvious that the drop through to the next trunk does not happen till the script finishes and it is waiting for the email to be 'sent' before it ends.
So unless some better way to send an email is found it seems that the Monitor-Trunk-Failures option should never be used for Trunk-Balance trunks.
Its use on trunks used in outbound routes using multiple trunks is also suspect if frequent failures are expected.
The script being used can be found at <http://pbxinaflash.com/community/in...ert-on-trunk-failure.1968/page-3#post-100993>
Edit: The use of the Monitor-Trunk-Failures option with Trunk-Balance is anyway not possible as it triggers the script every time it sends the call to the 2nd trunk as it does that be 'failing' the first trunk.
I then discovered that I was getting delays/failures when using the Trunk-Balance module to alternate calls between two trunk lines.
I tracked this to what looks like a 50 second or so delay whenever an outbound route has two trunks defined and the first trunk fails. The 2nd trunk does not take over immediately.
Disabling the Monitor-Trunk-Failures option removes the delay.
Further tests showed that it was the final line in the script, which was sending the notification email, that caused the delay. If that was commented out then there was no noticeable delay. I have not checked the logs but it seems obvious that the drop through to the next trunk does not happen till the script finishes and it is waiting for the email to be 'sent' before it ends.
So unless some better way to send an email is found it seems that the Monitor-Trunk-Failures option should never be used for Trunk-Balance trunks.
Its use on trunks used in outbound routes using multiple trunks is also suspect if frequent failures are expected.
The script being used can be found at <http://pbxinaflash.com/community/in...ert-on-trunk-failure.1968/page-3#post-100993>
Edit: The use of the Monitor-Trunk-Failures option with Trunk-Balance is anyway not possible as it triggers the script every time it sends the call to the 2nd trunk as it does that be 'failing' the first trunk.