I am new to twilio and am just trying a couple of things out. I had the case for voicemail as this: http://twimlets.com/[email protected]&Message=please%20leave%20a%20message&Transcribe=true& the case for forwarding was this http://twimlets.com/forward?PhoneNumber=1115551212
How would I combine these two so that first it does the forwarding and then if there are no answers it does the voicemail? Or would I need a php code snippet to do this?
Appreciate any hints...
You can chain Twimlets to do what you want. One of the options for the forward Twimlet is a failURL which will be called if there is no answer before your specified timeout, so you just add your voicemail link there.
Using your examples and adding a 30 second timeout before it diverts to voicemail give you this:
http://twimlets.com/forward?PhoneNumber=1115551212&Timeout=30&FailUrl=http%3A%2F%2Ftwimlets.com%2Fvoicemail%3FEmail%3Dmyemailaddress%40yahoo.com%26Message%3Dplease%2520leave%2520a%2520message%26Transcribe%3Dtrue%26&