blob: c83b40a0ad27e2105e08be0d4c49eb5bc10dd4c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# -*- coding: UTF-8 -*-
# -*- python -*-
# Copyright (C) 2006 by Sebastian Dröge
#
# This file may be distributed and/or modified under the terms of
# the GNU General Public License version 2 as published by
# the Free Software Foundation.
# This file is distributed without any warranty; without even the implied
# warranty of merchantability or fitness for a particular purpose.
# See "COPYING" in the source distribution for more information.
#
# $id$
#
from sdapplet.pluginutils import *
import subprocess
class plugin_ekiga:
def __init__(self):
self.service_type = ["_h323._tcp", "_sip._udp"]
self.author = "Sebastian Dröge"
self.description = "Start SIP/h323 connections with Ekiga"
def connect(self, use_host_names, name, stype, hostname, address, port, txts):
if use_host_names == True:
address = hostname
print "connecting using ekiga"
cmdline = ["ekiga"]
if stype == "_sip._udp":
cmdline += ["-c", "sip:%s:%s" % (address, port)]
else:
cmdline += ["-c", "h323:%s:%s" % (address, port)]
print cmdline
pid = subprocess.Popen(cmdline).pid
def load():
return plugin_ekiga()
|