System information
Our dialplan simply answers the call and attempts to place a call to vuc.me,
§
wait 30
seconds for that user to answer, and, if there is no answer, play back a message saying
that the user is currently unavailable before hanging up. We could, of course, be more
elaborate with our dialplan; for example, we could turn this into a Macro() or GoSub()
routine so we just needed to pass in the name of the person we wish to call.
Unfortunately, if you’re utilizing a device that only has a number pad for dialing, you’ll
need to assign extension numbers to all your favorite Skype buddies. However, we’ve
come up with a clever way of reading back your online buddies to you, which we’ll
describe in “Calling your Skype buddies without assigning extension num-
bers” on page 433.
If you have a softphone, though, you should have the ability to place calls by dialing
names directly. We can use this to our advantage by creating a pattern match in our
dialplan with the prefix of SKYPE:
[LocalSets]
exten => _SKYPE-.,1,Verbose(2,Dialing via Skype)
same => n,Set(NameToDial=${FILTER(a-zA-Z0-9.,${EXTEN:6})})
same => n,Playback(silence/1&pls-wait-connect-call)
same => n,Dial(Skype/${NameToDial},30)
same => n,Playback(user&is-curntly-unavail)
same => n,Hangup()
By dialing SKYPE-vuc.me, we can dial the VoIP Users Conference via Skype from our
softphone. The FILTER() function is used here to control what we’re allowed to pass
to the Dial() application. If we didn’t do any filtering, someone could potentially send
a string like SKYPE-nobody&SIP/my_itsp/4165551212, replacing the number 4165551212
with a number that is very expensive to call. By using FILTER(), we restrict the allowable
characters to alphanumeric characters and periods.
After that, we’re simply passing the string to the Dial() application and waiting for an
answer for 30 seconds. If no one answers, an audio message is played back to the caller
stating that the user is unavailable and then the call is hung up.
To receive calls, you simply need to configure your user in the chan_skype.conf file as
described in “Configuring chan_skype.conf” on page 429. Once you’ve done that, you
can configure your dialplan to answer calls like so:
[skype_incoming]
exten => start,1,Verbose(2,Incoming Skype Call)
same => n,Answer()
same => n,Dial(SIP/0000FFFF0001,30)
same => n,Playback(user&is-curntly-unavail)
same => n,Hangup()
Obviously, you can change this section of the dialplan to be more elaborate; all we’ve
done is configured the dialplan to call our SIP device at 0000FFFF0001, wait for an answer
§ The VUC is the VoIP Users Conference, which runs weekly at 12:00 noon Eastern time (–0500 GMT). More
information is available at http://vuc.me.
Skype Integration | 431