1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. If you had a PIAF Forum account in the vBulletin days, log in with your old credentials. Otherwise, sign up again and we'll get you back in business as soon as we can.

Skype phonebook agi

Discussion in 'Add-On Install Instructions' started by rxcomm, Dec 22, 2010.

  1. rxcomm Guru

    Here's a bit of php that implements a (very) rudimentary Skype phonebook. I'm sure this can be improved significantly, but its a start. Grab the code here and save it as /var/lib/asterisk/agi-bin/skype.php. You also need to make it executable.

    Next you need to create your phonebook. Edit the file /var/lib/asterisk/agi-bin/skype.xml and put entries similar to the following in it:

    Code:
    <user1>dave</user1>
    <user2>bob</user2>
    <user3>jim</user3>
    
    where dave, bob, and jim are skype userids.

    Sample dialplan code is in the comments at the top of skype.php. Add this at the appropriate place in extensions_custom.conf, reload your dialplan and you should have a Skype phonebook that you can dial from.

    Usage - call the extension you put this at (717 in the example dialplan code), and at the voice prompt enter the user number you want to call with the DTMF pad on your phone. For example, if you wanted to call jim, you would key in the number 3. The system should then dial skype user jim. If you dial a number that does not have a corresponding skype user associated with it, the system let you know.

    This (of course) requires that you have set up a skype trunk per NV. Works for me with asterisk 1.4 and 1.8. This code is public-domain.

    Dave
  2. rxcomm Guru

    Now calls all sip uri's

    Skype's been down :wink5: so I modified the phonebook script to include dialing all sip uri's.

    Modified script is here.

    In view of the additional functionality, I renamed the script pb.php and the phonebook user.xml. Otherwise, installation is the same as above.

    Dave

Share This Page