View Single Post
Posts: 93 | Thanked: 13 times | Joined on Nov 2010
#2
Code:
#!/usr/bin/python
 
import dbus
import sys
 
# Get the target phone number (or SIP address) from the command line
TARGET = sys.argv[1];
 
# Configure the telepathy path to the SofiaSIP account that we wish to use.
# Use "mc-tool list" (from the libmissioncontrol-utils package) to see your accounts.
SIP_ACCOUNT = 'sofiasip/sip/_31234567_40sipgate_2eco_2euk0'
 
# This gets us a connnection to the session bus
bus = dbus.SessionBus()
 
# This sets up a path to the SIP account within telepathy.
PATH = '/org/freedesktop/Telepathy/Account/'
PATH += SIP_ACCOUNT
 
# This sets up a proxy object as a "handle" to the AccountManager of our target account
account = bus.get_object('org.freedesktop.Telepathy.AccountManager', PATH)
 
# This launches the actual SIP call with a method call to EnsureChannel on that object
account.EnsureChannel( \
        dbus.Dictionary({
                dbus.String(u'org.freedesktop.Telepathy.Channel.TargetHandleType'): dbus.UInt32(1),
                dbus.String(u'org.freedesktop.Telepathy.Channel.ChannelType'): dbus.String(u'org.freedesktop.Telepathy.Channel.Type.StreamedMedia'),
                dbus.String(u'org.freedesktop.Telepathy.Channel.TargetID'): dbus.String(TARGET),
        }, signature='sv'),
        dbus.UInt64(0),
        dbus.String(''),
        dbus_interface='com.nokia.Account.Interface.ChannelRequests')
 
sys.exit(0)
Check below for more info...
http://wiki.maemo.org/Phone_control

Enjoy.
 

The Following User Says Thank You to rosh For This Useful Post: