Skype for Asterisk component for Adhearsion
After having more time to work in detail with the Skype for Asterisk (SFA) channel in closed beta, I have developed an Adhearsion component to ease my development and testing efforts. Hopefully this will ease yours in the near future when the public beta becomes available.
The Skype Utils component provides a few features to take advantage of what this new channel brings to the Asterisk platform. First, the component provides a single method call to access a wealth of information in your dialplan that is delivered with each Skype call. This type of information is unheard of on any other channel available to Asterisk (let alone telecoms in general), this information includes:
- skype_languages – A space-separated list of language identifiers (ie – es, en, etc)
- skype_topic – A user-provided string that can identify the ‘topic’ of the call
- skype_token – Similar to skype_topic
- skype_about – ‘about’ profile entry
- skype_birthday – Birthday
- skype_gender – Gender
- skype_homepage – Home page URL
- skype_homephone – Home phone number
- skype_officephone – Office phone number
- skype_mobilephone – Mobile phone number
- skype_city – City name
- skype_province – State/Province name
- skype_country – Country name
The next feature that the component provides is the ability to map Skype usernames with Asterisk extensions. Typically Asterisk is used with phones that require you to enter a numeric phone number when dialing someone. Of course most Skype names are usernames that have nothing to do with a phone number. With this component you may enter the relationship between an extension number and a Skype username in database with a Ruby on Rails web interface. Then when calls are made to and from the Skype network you have a seamless translation between the two.
Last (so far), but not least, is the ability to track Skype presence information. The SFA channel allows you to add ‘buddies’ to your Asterisk/Skype username. Once this has been done, you are then able to obtain status updates from each of the buddies on your list.
The component then allows you to track these status updates and access them in your dialplan. The status updates may be persisted to a database or kept in memory. Further, those status updates are not only available to your dialplan but to the REST, DRb and STOMP APIs of Adhearsion, making them available to virtually any program.
With this you may track if each Skype user is in one of the following states:
- Online – user is online
- Skype Me – user is available and asking to be ‘Skyped’
- Away – the user is away from their Skype client
- Not Available – the user is not available for a call
- Do Not Disturb – the user does not want to be disturbed
- Offline (Voicemail Enabled) – the user is offline and has voicemail
- Offline (Voicemail Disabled) – the user is offline and has no voicemail
Stay tuned for example applications that will build upon this component. In the meantime do not hesitate to have a look at the code and details here.
I would also like to thank @steely_glint and Todd Gould, fellow beta team members, for their assistance in constructing an environment where all the pieces could work. Great progress is being made on the SFA beta code, but of course there are still some quirks.