edoceo

Calling Direct to Voicemail (FreeSWITCH, Twilio)

How to originate phone calls directly to Voicemail using FreeSWITCH or Twilio.

How to Call to Voicemail

Direct to Voicemail is a trick you can play on the phone-system. It works by first tying the line, then dialing the voice-mail targeted call while terminating the first call.

Originate Alpha call, which starts, connects (early media) and ties the line. Then Originate the Beta call, it will route to VM; runs VMD, playback file, hang up While Beta is running, drop Alpha call. The target phone will likely not ring.

Our VBX product has this feature.

Direct to Voicemail with FreeSWITCH §

On FreeSWITCH this can be accomplished quite easily with some JavaScript or Lua. Creating this operation from the ESL is a touch more complicated.

call_one = freeswitch.Session("sofia/gateway/external/$DIAL", session);
call_two = freeswitch.Session("sofia/gateway/external/$DIAL", session);
call_one.hangup();
call_two.execute("avmd");
call_two.streamFile("/sounds/all-glory-to-the-hypnotoad.mp3");

We also provide FreeSWITCH consulting.

Straight to Voicemail with Twilio §

Call timing control on Twilio is rather limted vis-a-vis FreeSWITCH but the same thing is still possible. Originate two calls, one that hangs up and one that goes to Voicemail.

Call_One = POST /2010-04-01/Accounts/{AccountSid}/Calls From=$SELF To=$DIAL Url=$YOUR_API Timeout=8
Call_Two = POST /2010-04-01/Accounts/{AccountSid}/Calls From=$SELF To=$DIAL Url=$YOUR_API IfMachine=Continue

So, Call_One connects to the party, but times out fast, while Call_Two connects, waits for VM. The TwiML application at $YOUR_API will need to be constructed properly to operate to close the first call and to handle the IfMachine condition properly.

See Also

Change Log

  • 2016-04-25 - Became Aware of patent which.

Loading Comments from Disqus...