Made this change because if the XML is not generated then extension variables are not available. These variables are needed for call forward and follow me.
Use sofia_contact instead of user bridge alias. Added a useful note from @greenbea describing why there was a problem with follow me delay timing.
When you originate user/ext@domain, switch_ivr_originate will call the user endpoint. The user endpoint isn't a real endpoint. It is a shortcut to get the real dialstring from the user's XML and calls again switch_ivr_originate, so essentially, what happens is switch_ivr_originate reads twice originate_delay_start variable and waits double the time.
Your patch fixes the case when the endpoint is the user/ endpoint but will make the delay half the time if called with other endpoints like sofia.
The ultimate solution would be freeswitch to handle this in the user endpoint function. I would suggest that fusion manually get the user's dial string from the XML and call originate on it and not rely on the user (shortcut) endpoint for ring group and follow me.
Use sofia_contact instead of user bridge alias. Added a useful note from @greenbea describing why there was a problem with follow me delay timing.
When you originate user/ext@domain, switch_ivr_originate will call the user endpoint. The user endpoint isn't a real endpoint. It is a shortcut to get the real dialstring from the user's XML and calls again switch_ivr_originate, so essentially, what happens is switch_ivr_originate reads twice originate_delay_start variable and waits double the time.
Your patch fixes the case when the endpoint is the user/ endpoint but will make the delay half the time if called with other endpoints like sofia.
The ultimate solution would be freeswitch to handle this in the user endpoint function. I would suggest that fusion manually get the user's dial string from the XML and call originate on it and not rely on the user (shortcut) endpoint for ring group and follow me.
When the outbound route has more than one bridge statement use it for fail over.
One thing to keep in mind FreeSWITCH seems to limit the sized of the originate command. So we have to be careful how large the string is. If the originate string is too long it will be truncated and fail. For this reason commented out a few variables.