twilio / OpenVBX

OpenVBX is a web-based open source phone system for business.
http://openvbx.org
Other
699 stars 342 forks source link

Changing flow, erroneous reassignment of Voice and SMS URLs #116

Open TonyGravagno opened 13 years ago

TonyGravagno commented 13 years ago

Create a flow with neither a Call flow nor a SMS flow. Now set the Voice URL and SMS URL for some phone. In OpenVBX assign the flow to the number. Check the Twilio dashboard nd both the Voice and SMS URLs are set on the number. I suggest that if there is no Call flow that the Voice URL should not be set on the number. And if there is no SMS flow the SMS URL should not be set. I have numbers set to call to two different systems depending on whether it's accepting Voice or SMS, I don't want that to be changed when a flow doesn't actually contain an override.

ntemple commented 12 years ago

I've played with refactoring the system so that numbers and flows are separated into "channels" ... so you end up with a number for SMS and a separate number for voice [even if they are the same phone number, the records are shown as disconnected]. Similarly, I've changed the flows table to be per channel. i.e., instead of having a single record with both sms_data and voice_data, you now have 1 record per flow, and a flow type.

The patch is kind of hacky but if anyone wants to take a look I'll publish it. For new systems, it seems to work great. BUT I see no easy way to upgrade an existing systems since the flow_id's will change as each current flow is split into 2 records.