[commit] r12767 - freeswitch/trunk/scripts/contrib/nmartin/osx_address_book_dial
Author: nmartin Date: Tue Mar 24 19:39:41 2009 New Revision: 12767 Log: initial import Address Book Dialer applet OS X only :( Added: freeswitch/trunk/scripts/contrib/nmartin/osx_address_book_dial/ freeswitch/trunk/scripts/contrib/nmartin/osx_address_book_dial/ESL.pyc (contents, props changed) freeswitch/trunk/scripts/contrib/nmartin/osx_address_book_dial/README.txt freeswitch/trunk/scripts/contrib/nmartin/osx_address_book_dial/_ESL.so (contents, props changed) freeswitch/trunk/scripts/contrib/nmartin/osx_address_book_dial/fsdial.py freeswitch/trunk/scripts/contrib/nmartin/osx_address_book_dial/fsdial.scpt (contents, props changed) freeswitch/trunk/scripts/contrib/nmartin/osx_address_book_dial/test.scpt (contents, props changed) Added: freeswitch/trunk/scripts/contrib/nmartin/osx_address_book_dial/ESL.pyc ============================================================================== Binary file. No diff available. Added: freeswitch/trunk/scripts/contrib/nmartin/osx_address_book_dial/README.txt ============================================================================== --- (empty file) +++ freeswitch/trunk/scripts/contrib/nmartin/osx_address_book_dial/README.txt Tue Mar 24 19:39:41 2009 @@ -0,0 +1,39 @@ +README + + +============================================================== +Copyright (c) 2009 Nik Martin + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +The original author of this work, Nik Martin, must be credited +as the original author of this work. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + + +============================================================== + + +Drop all thee files in ~/Library/Address Book Scripts + +Edit fsdial.py to set up your server information and phone number + +Start Address Book. You should now have a FS Dial entry on the popup menu on phone numbers now. \ No newline at end of file Added: freeswitch/trunk/scripts/contrib/nmartin/osx_address_book_dial/_ESL.so ============================================================================== Binary file. No diff available. Added: freeswitch/trunk/scripts/contrib/nmartin/osx_address_book_dial/fsdial.py ============================================================================== --- (empty file) +++ freeswitch/trunk/scripts/contrib/nmartin/osx_address_book_dial/fsdial.py Tue Mar 24 19:39:41 2009 @@ -0,0 +1,82 @@ +#!/usr/bin/env python + + +#============================================================== +#Copyright (c) 2009 Nik Martin +# +#Permission is hereby granted, free of charge, to any person +#obtaining a copy of this software and associated documentation +#files (the "Software"), to deal in the Software without +#restriction, including without limitation the rights to use, +#copy, modify, merge, publish, distribute, sublicense, and/or sell +#copies of the Software, and to permit persons to whom the +#Software is furnished to do so, subject to the following +#conditions: +# +#The above copyright notice and this permission notice shall be +#included in all copies or substantial portions of the Software. +# +#The original author of this work, Nik Martin, must be credited +#as the original author of this work. +# +#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +#EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +#OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +#NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +#HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +#WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +#FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +#OTHER DEALINGS IN THE SOFTWARE. +# +# +#============================================================== + +import string +import sys +from optparse import OptionParser +from ESL import * + + +def main(argv): + # change these to match your configuration + my_number = "1000" #@mydomain.com + server_addr = "fs.ip.add.ress" + server_port = "8021" + server_auth = "ClueCon" + + + try: + + parser = OptionParser() + parser.add_option("-n", "--number", dest="number", + help="number to dial") + + (options, args) = parser.parse_args() + + + if not options.number: + print "ERROR: destination number required" + sys.exit(2) + + cmd = "api originate {ignore_early_media=true,origination_caller_id_number=" + options.number + ",effective_caller_id_number=" + my_number + "}user/" + my_number + " &transfer(" + options.number + " XML default)" + print cmd + + con = ESLconnection(server_addr, server_port, server_auth) + #are we connected? + + if con.connected: + + e=con.sendRecv(cmd) + print e.getBody() + + else: + + print "Not Connected" + sys.exit(2) + + except: + print "Unexpected error:", sys.exc_info()[0] + raise + +if __name__ == "__main__": + main(sys.argv[1:]) \ No newline at end of file Added: freeswitch/trunk/scripts/contrib/nmartin/osx_address_book_dial/fsdial.scpt ============================================================================== Binary file. No diff available. Added: freeswitch/trunk/scripts/contrib/nmartin/osx_address_book_dial/test.scpt ============================================================================== Binary file. No diff available.
participants (1)
-
FreeSWITCH SVN