← All tags

ActiveRecord

Time based conditions in voice application

The typical telephony system processes incoming call flows based on different times. Customers want to have control over this and handle time ranges. The platform can also be a multi-tenant server with different virtual PBXes. In my implementation, I use Ruby, ActiveRecord, and polymorphic associations to create routing blocks. By reusing polymorphic database associations, I can create flexible call flow building blocks. These blocks can be linked to any voice-related entity in a PBX, such as an extension, voicemail, conference, etc. This enables customizable and dynamic call handling based on time conditions.