Posts

FreePBX multiple time conditions

The easiest way to get multiple time conditions in FreePBX is to daisy chain them. A common scenario is to have a standard time condition for normal opening hours and in addition to that, time conditions for holidays occuring on normal weekdays, like christmas and new year for example.

  • Create one time group for normal opening hours, for example monday to friday 08.00-17.00.
  • Create one time condition for the normal opening hours, using the above time group. If time matches, connect the destination to the open IVR or queue. If time doesn’t match, connect it to a closed IVR or a voice message saying you’re closed. This is going to be the last time condition in the chain.
  • Create time groups for each of the holidays. If time matches, connect the destination to a voice message saying you’re closed. If time condition doesn’t match connect it to the next time condition. Remember, the last time condition in the chain should be the one for normal opening hours.
  • Connect the inbound route to the first time condition in your chain.

Inbound route -> Time condition for holiday 1 -> Time condition for holiday 2 -> Time condition for normal opening hours

Asterisk / FreePBX sip trunk registration problem, Serious Network Trouble

The asterisk log file (/var/log/asterisk/full) shows entries like this:

[Sep  3 04:02:08] ERROR[3984] chan_sip.c: Serious Network Trouble; __sip_xmit returns error for pkt data

Solution: The server had been moved from one public IP-address to another. In Asterisk PBX settings, the fields for both External IP and Bind Address (under Advanced) needed adjustment to the new IP-address. After server reload everything worked normally.