Example Scenarios

Note: the examples in this page assume that we are providing you with an 03 number. All of the options here are available on all of the number types we offer.

How do I ... ?

  1. Make my 03 number make calls come through to my mobile
  2. Make calls to my 03 number come in to my SIP server, but this server only accepts calls if the caller has authenticated
  3. When people dial my 03 number I want it to try my landline for 10 seconds, then my partner’s landline for 10 seconds, and keep alternating between them
  4. I want both my and my partner’s phones to ring but if neither of us picks up in 20 seconds then I want the caller to go to voicemail
  5. How do I make my number ring my landline and my partner’s landline simultaneously for 20 seconds during 9am to 5pm weekdays (then go to voicemail if not answered), on Saturdays 9am - 1pm divert to my mobile, and other times send the caller to voicemail?
  6. I want callers to hear a menu "press 1 for sales, 2 for accounts and 0 to hear these options again".
  7. I want a menu for callers to choose which department they want to speak to, but different departments are open at different times and I want out of hours calls for each department to go to a voicemail for that department


Question 1

"Make my 03 number make calls come through to my mobile"

Answer:

Call telecoms.num.route to divert your 03 number directly to your mobile number.


Question 2

"Make calls to my 03 number come in to my SIP server, but this server only accepts calls if the caller has authenticated"

Answer:

Call telecoms.num.route to divert your 03 number directly to your SIP address, but in the destination details include auth_user, auth_pass and (if your server needs it) auth_realm.


Question 3

"When people dial my 03 number I want it to try my landline for 10 seconds, then my partner’s landline for 10 seconds, and keep alternating between them."

Answer:

Use telecoms.routeplan.create to create a huntgroup (routeplan) with two destination numbers:

  1. your landline number
  2. your partner’s landline number
Specify a 10 second timeout for both of them.

telecoms.routeplan.create will return a routeplanID.

Then call telecoms.num.route to route your 03 number to that routeplanID.

When the huntgroup has timed out on the last destination number, it will go back to the beginning. The only exception to this is if both numbers are busy, in which case the caller will hear busy and the call will end.


Question 4

"I want both my and my partner’s phones to ring but if neither of us picks up in 20 seconds then I want the caller to go to voicemail."

Answer:

  1. Use telecoms.voicemail.mailbox.create to create a voicemail mailbox. This will return a mailboxID.
  2. Use telecoms.routeplan.create to create a routeplan with three destinations: Specify a 20 second timeout for the two phone numbers, and use the mode argument to specify the mode as parallel. telecoms.routeplan.create will return a routeplanID.
  3. use telecoms.num.route to route your 03 number to the new routeplanID

Both phones will ring; the first one to be answered gets the call and the other will stop ringing. If neither are answered after 20 seconds, the call will divert to voicemail and (if you specified an email address when you created the mailbox) the recorded message will be emailed to you.


Question 5

"How do I make my number ring my landline and my partner’s landline simultaneously for 20 seconds during 9am to 5pm weekdays (then go to voicemail if not answered), on Saturdays 9am - 1pm divert to my mobile, and other times send the caller to voicemail?"

Answer:

  1. use telecoms.routeplan.create to create a huntgroup the same as the one in Question 4. This will return a routeplanID
  2. use telecoms.voicemail.mailbox.create to create a voicemail mailbox (again, if you want messages to be emailed, specify an email address when creating the mailbox). This will return a mailboxID
  3. use telecoms.dayparting.create to create a time of day routing with 3 destinations - one being your routeplanID from step 1 above, the second being your mobile phone number and the third being your mailboxID from step 2 above. Specify the time periods such that the calls go to each destination at the appropriate times. This will return a daypartingID.
  4. use telecoms.num.route to route your 03 number to the daypartingID.


Question 6

"I want callers to hear a menu “press 1 for sales, 2 for accounts and 0 to hear these options again”. Sales calls should come to my landline and accounts to my partner’s."

Answer:

  1. use telecoms.soundclip.create to upload a suitable announcement sound to play to the caller when they arrive at the menu; this will return a soundclipID
  2. use telecoms.ivr.create to create an IVR menu, specifying your new soundclipID in prompt_bg_soundclipID (because it’s a background soundclip, the caller can press the option they want, if they already know it, before the announcement has finished playing). Specify the options with keypress 1 going to your landline number, option 2 going to your partner’s landline number, and option 0 going to ivrID 0 (ivrID of zero refers back to the current IVR). telecoms.ivr.create will return an ivrID.
  3. use telecoms.num.route to route your 03 number to the above ivrID


Question 7

"I want a menu for callers to choose which department they want to speak to, but different departments are open at different times and I want out of hours calls for each department to go to a voicemail for that department"

Answer:

  1. use telecoms.voicemail.mailbox.create to create a voicemail for each department, noting the returned mailboxID for each one
  2. use telecoms.dayparting.create to create a time of day routing with appropriate times for that department. Specify that department’s phone number as one destination (or first create a huntgroup with telecoms.routeplan.create and use the returned routeplanID if you need it to try several numbers)
  3. repeat step (2) for each department
  4. use telecoms.soundclip.create to upload a sound file to play to callers as they arrive at the menu; this will return a soundclipID
  5. use telecoms.ivr.create to create an IVR menu, using the soundclipID from step (4) in prompt_bg_soundclipID and define the options with the destination for each option being the appropriate daypartingID. This will return an ivrID
  6. use telecoms.num.route to route your 03 number to the above ivrID