From decfe8e3f5f428d34cae5735af6919ee39f81508 Mon Sep 17 00:00:00 2001 From: blogic Date: Tue, 14 Feb 2012 15:05:52 +0000 Subject: [lantiq] add a simple sip client git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30519 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/owsip/files/telephony.conf | 32 ++++++++++++++++++++ package/owsip/files/telephony.defaults | 55 ++++++++++++++++++++++++++++++++++ package/owsip/files/telephony.init | 50 +++++++++++++++++++++++++++++++ 3 files changed, 137 insertions(+) create mode 100644 package/owsip/files/telephony.conf create mode 100755 package/owsip/files/telephony.defaults create mode 100644 package/owsip/files/telephony.init (limited to 'package/owsip/files') diff --git a/package/owsip/files/telephony.conf b/package/owsip/files/telephony.conf new file mode 100644 index 0000000000..7cc1e9f0f2 --- /dev/null +++ b/package/owsip/files/telephony.conf @@ -0,0 +1,32 @@ +config general general + option name owsip + option backend ltq_tapi + option ossdev 0 + option log_level 3 + option interface nas0 + option local_port 5060 + option rtp_port 4000 + option locale germany + +config stun stun + option host stun.myrealm.com + option port 3478 + +config account example1 + option realm myrealm1.com + option username myuser1 + option password mypass1 + option disabled 1 + +config account example2 + option realm myrealm2.com + option username myuser2 + option password mypass2 + option disabled 1 + +config contact + option desc "example contact description" + option code "example" + option dial "0123456789" + option type realm + diff --git a/package/owsip/files/telephony.defaults b/package/owsip/files/telephony.defaults new file mode 100755 index 0000000000..bec2878a0d --- /dev/null +++ b/package/owsip/files/telephony.defaults @@ -0,0 +1,55 @@ +#!/bin/sh +# +# Copyright (C) 2011 OpenWrt.org +# based on ar71xx +# + +COMMIT_TELEPHONY=0 + +set_relay() { + local cfg="relay_$1" + local gpio=$1 + local val=$2 + + uci -q get telephony.$cfg && return 0 + + uci batch < /sys/class/gpio/export + [ -f "/sys/class/gpio/gpio$gpio/direction" ] && { + echo "out" > /sys/class/gpio/gpio$gpio/direction + echo "$value" > /sys/class/gpio/gpio$gpio/value + } +} + +start() { + config_load telephony + config_foreach relay_set relay + load_module + service_start /usr/bin/owsip_ua +} + +stop() { + service_stop /usr/bin/owsip_ua +} -- cgit v1.2.3