Update asterisk-addons-1.4.x to 1.4.7
Requires a patch to pthread call. Signed-off-by: Michael Geddes <michael at frog dot wheelycreek dot net> git-svn-id: svn://svn.openwrt.org/openwrt/packages@12795 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
8b28448af3
commit
cbee4e0946
@ -9,12 +9,12 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=asterisk-addons
|
PKG_NAME:=asterisk-addons
|
||||||
PKG_VERSION:=1.4.2
|
PKG_VERSION:=1.4.7
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=http://ftp.digium.com/pub/asterisk/old-releases/
|
PKG_SOURCE_URL:=http://downloads.digium.com/pub/asterisk/releases/
|
||||||
PKG_MD5SUM:=c080b02e6ddc81dab6a64691af890805
|
PKG_MD5SUM:=3b14c147101c13ca6146c41870bad97a
|
||||||
|
|
||||||
PKG_FIXUP = libtool
|
PKG_FIXUP = libtool
|
||||||
|
|
||||||
@ -91,6 +91,7 @@ ifneq ($(SDK)$(CONFIG_PACKAGE_asterisk14-mysql),)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
CONFIGURE_ARGS += \
|
CONFIGURE_ARGS += \
|
||||||
|
--with-asterisk="$(STAGING_DIR)/usr" \
|
||||||
--with-bluetooth="$(STAGING_DIR)/usr" \
|
--with-bluetooth="$(STAGING_DIR)/usr" \
|
||||||
--with-ncurses="$(STAGING_DIR)/usr" \
|
--with-ncurses="$(STAGING_DIR)/usr" \
|
||||||
--with-mysqlclient="$(STAGING_DIR)/usr" \
|
--with-mysqlclient="$(STAGING_DIR)/usr" \
|
||||||
@ -110,12 +111,13 @@ endef
|
|||||||
|
|
||||||
MAKE_ARGS:= \
|
MAKE_ARGS:= \
|
||||||
AM_CFLAGS="$(TARGET_CFLAGS)" \
|
AM_CFLAGS="$(TARGET_CFLAGS)" \
|
||||||
OPTIMIZE="$(TARGET_CFLAGS)" \
|
OPTIMIZE="$(TARGET_CFLAGS) -DLOW_MEMORY" \
|
||||||
OPTIONS="" \
|
OPTIONS="" \
|
||||||
|
NOISY_BUILD="yes" \
|
||||||
BLUETOOTH_LIB="$(TARGET_LDFLAGS) -lbluetooth" \
|
BLUETOOTH_LIB="$(TARGET_LDFLAGS) -lbluetooth" \
|
||||||
|
|
||||||
MAKE_VARS:= \
|
MAKE_VARS:= \
|
||||||
CFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY" \
|
CFLAGS="$(EXTRA_CFLAGS)" \
|
||||||
LDFLAGS="$(EXTRA_LDFLAGS)" \
|
LDFLAGS="$(EXTRA_LDFLAGS)" \
|
||||||
|
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
|
@ -1,398 +1,13 @@
|
|||||||
diff -Nru asterisk-addons-1.4.2/build_tools/menuselect-deps.in asterisk-addons-svn/build_tools/menuselect-deps.in
|
diff -Nru asterisk-addons-1.4.6.org/build_tools/menuselect-deps.in asterisk-addons-1.4.6/build_tools/menuselect-deps.in
|
||||||
--- asterisk-addons-1.4.2/build_tools/menuselect-deps.in 2007-05-14 18:22:44.000000000 +0200
|
--- asterisk-addons-1.4.6.org/build_tools/menuselect-deps.in 2007-05-14 18:22:44.000000000 +0200
|
||||||
+++ asterisk-addons-svn/build_tools/menuselect-deps.in 2007-06-04 19:10:59.000000000 +0200
|
+++ asterisk-addons-1.4.6/build_tools/menuselect-deps.in 2008-03-06 08:38:14.000000000 +0100
|
||||||
@@ -1,2 +1,3 @@
|
@@ -1,2 +1,3 @@
|
||||||
+BLUETOOTH=@PBX_BLUETOOTH@
|
+BLUETOOTH=@PBX_BLUETOOTH@
|
||||||
MYSQLCLIENT=@PBX_MYSQLCLIENT@
|
MYSQLCLIENT=@PBX_MYSQLCLIENT@
|
||||||
ASTERISK=@PBX_ASTERISK@
|
ASTERISK=@PBX_ASTERISK@
|
||||||
diff -Nru asterisk-addons-1.4.2/configs/mobile.conf.sample asterisk-addons-svn/configs/mobile.conf.sample
|
diff -Nru asterisk-addons-1.4.6.org/channels/chan_mobile.c asterisk-addons-1.4.6/channels/chan_mobile.c
|
||||||
--- asterisk-addons-1.4.2/configs/mobile.conf.sample 1970-01-01 01:00:00.000000000 +0100
|
--- asterisk-addons-1.4.6.org/channels/chan_mobile.c 1970-01-01 01:00:00.000000000 +0100
|
||||||
+++ asterisk-addons-svn/configs/mobile.conf.sample 2007-06-04 19:11:00.000000000 +0200
|
+++ asterisk-addons-1.4.6/channels/chan_mobile.c 2008-03-06 08:38:57.000000000 +0100
|
||||||
@@ -0,0 +1,30 @@
|
|
||||||
+;
|
|
||||||
+; mobile.conf
|
|
||||||
+;
|
|
||||||
+
|
|
||||||
+[general]
|
|
||||||
+interval=60 ; Number of seconds between trying to connect to devices.
|
|
||||||
+
|
|
||||||
+; The following is a list of the devices we deal with.
|
|
||||||
+; Every device listed below will be available for calls in and out of Asterisk.
|
|
||||||
+; Discovered devices not in this list are not available.
|
|
||||||
+; Use the CLI command 'mobile search' to discover devices.
|
|
||||||
+; Use the CLI command 'mobile show devices' to see device status.
|
|
||||||
+;
|
|
||||||
+; To place out through a cell phone use Dial(Mobile/[device]/NNN.....) in your dialplan.
|
|
||||||
+; To call a headset use Dial(Mobile/[device]).
|
|
||||||
+
|
|
||||||
+;[dave]
|
|
||||||
+;address=00:12:56:90:6E:00
|
|
||||||
+;port=4
|
|
||||||
+;context=incoming-mobile
|
|
||||||
+
|
|
||||||
+;[blackberry]
|
|
||||||
+;address=00:0F:86:0E:AE:42
|
|
||||||
+;port=2
|
|
||||||
+;context=incoming-mobile
|
|
||||||
+
|
|
||||||
+;[headset]
|
|
||||||
+;address=00:0B:9E:11:74:A5
|
|
||||||
+;port=1
|
|
||||||
+;type=headset
|
|
||||||
diff -Nru asterisk-addons-1.4.2/configure.ac asterisk-addons-svn/configure.ac
|
|
||||||
--- asterisk-addons-1.4.2/configure.ac 2007-05-14 18:22:44.000000000 +0200
|
|
||||||
+++ asterisk-addons-svn/configure.ac 2007-06-04 19:11:00.000000000 +0200
|
|
||||||
@@ -17,7 +17,7 @@
|
|
||||||
AC_CONFIG_SRCDIR([res_config_mysql.c])
|
|
||||||
|
|
||||||
AC_COPYRIGHT("Asterisk-addons")
|
|
||||||
-AC_REVISION($Revision: 382 $)
|
|
||||||
+AC_REVISION($Revision: 384 $)
|
|
||||||
|
|
||||||
case "${host}" in
|
|
||||||
*freebsd*)
|
|
||||||
@@ -159,13 +159,14 @@
|
|
||||||
# from here on down, library checking should be done in alphabetical order
|
|
||||||
# by the --with option name, to make things easier for the users :-)
|
|
||||||
|
|
||||||
+AST_EXT_LIB_SETUP([BLUETOOTH], [Bluetooth Support], [bluetooth])
|
|
||||||
AST_EXT_LIB_SETUP([CURSES], [curses], [curses])
|
|
||||||
AST_EXT_LIB_SETUP([NCURSES], [ncurses], [ncurses])
|
|
||||||
AST_EXT_LIB_SETUP([MYSQLCLIENT], [mysqlclient], [mysqlclient])
|
|
||||||
AST_EXT_LIB_SETUP([ASTERISK], [asterisk], [asterisk])
|
|
||||||
|
|
||||||
+AST_EXT_LIB_CHECK([BLUETOOTH], [bluetooth], [ba2str], [bluetooth/bluetooth.h])
|
|
||||||
AST_EXT_LIB_CHECK([CURSES], [curses], [initscr], [curses.h])
|
|
||||||
-
|
|
||||||
AST_EXT_LIB_CHECK([NCURSES], [ncurses], [initscr], [curses.h])
|
|
||||||
|
|
||||||
MYSQL_CONFIG=No
|
|
||||||
diff -Nru asterisk-addons-1.4.2/doc/chan_mobile.txt asterisk-addons-svn/doc/chan_mobile.txt
|
|
||||||
--- asterisk-addons-1.4.2/doc/chan_mobile.txt 1970-01-01 01:00:00.000000000 +0100
|
|
||||||
+++ asterisk-addons-svn/doc/chan_mobile.txt 2007-06-04 19:11:00.000000000 +0200
|
|
||||||
@@ -0,0 +1,262 @@
|
|
||||||
+chan_mobile
|
|
||||||
+
|
|
||||||
+Asterisk Channel Driver to allow Bluetooth Cell/Mobile Phones to be used as FXO devices, and Headsets as FXS devices.
|
|
||||||
+
|
|
||||||
+Features :-
|
|
||||||
+
|
|
||||||
+Multiple cell phones can be connected.
|
|
||||||
+Multiple headsets can be connected.
|
|
||||||
+Asterisk automatically connects to each configured cell phone / headset when it comes in range.
|
|
||||||
+CLI command to discover bluetooth devices.
|
|
||||||
+Inbound calls on the cell network to the cell phones are handled by Asterisk, just like inbound calls on a Zap channel.
|
|
||||||
+CLI passed through on inbound calls.
|
|
||||||
+Dial outbound on a cell phone using Dial(Mobile/device/nnnnnnn) in the dialplan.
|
|
||||||
+Dial a headset using Dial(Mobile/device) in the dialplan.
|
|
||||||
+Application MobileStatus can be used in the dialplan to see if a cell phone / headset is connected.
|
|
||||||
+Supports devicestate for dialplan hinting.
|
|
||||||
+Supports Inbound and Outbound SMS.
|
|
||||||
+
|
|
||||||
+Using chan_mobile :-
|
|
||||||
+
|
|
||||||
+In order to use chan_mobile, you must have a working bluetooth subsystem on your Asterisk box.
|
|
||||||
+This means a working bluetooth adapter, and the BlueZ packages.
|
|
||||||
+
|
|
||||||
+Any bluetooth adapter supported by the Linux kernel will do, including usb bluetooth dongles.
|
|
||||||
+
|
|
||||||
+The BlueZ package you need is bluez-utils. If you are using a GUI then you might want to install bluez-pin also.
|
|
||||||
+You also need libbluetooth, and libbluetooth-dev if you are compiling Asterisk from source.
|
|
||||||
+
|
|
||||||
+You need to get bluetooth working with your phone before attempting to use chan_mobile.
|
|
||||||
+This means 'pairing' your phone with your Asterisk box. I dont describe how to do this here as the process
|
|
||||||
+differs from distro to distro. You only need to pair once.
|
|
||||||
+
|
|
||||||
+However, the easist way to pair, is to use you cell phone to search for bluetooth devices, select your Asterisk box
|
|
||||||
+and enter the requested PIN.
|
|
||||||
+
|
|
||||||
+See www.bluez.org for other details about setting up Bluetooth under Linux.
|
|
||||||
+
|
|
||||||
+Assuming you have bluetooth working ok:-
|
|
||||||
+
|
|
||||||
+Load chan_mobile.so
|
|
||||||
+
|
|
||||||
+Search for your bluetooth devices using the CLI command 'mobile search'. Be patient with this command as
|
|
||||||
+it will take 8 - 10 seconds to do the discovery.
|
|
||||||
+
|
|
||||||
+Headsets will generally have to be put into 'pairing' mode before they will show up here.
|
|
||||||
+
|
|
||||||
+This will return something like the following :-
|
|
||||||
+
|
|
||||||
+*CLI> mobile search
|
|
||||||
+Address Name Usable Type Port
|
|
||||||
+00:12:56:90:6E:00 LG TU500 Yes Phone 4
|
|
||||||
+00:80:C8:35:52:78 Toaster No Headset 0
|
|
||||||
+00:0B:9E:11:74:A5 Hello II Plus Yes Headset 1
|
|
||||||
+00:0F:86:0E:AE:42 Daves Blackberry Yes Phone 7
|
|
||||||
+
|
|
||||||
+This is a list of all bluetooth devices seen and whether or not they are usable with chan_cellphone.
|
|
||||||
+The Address field contains the 'bd address' of the device. This is like an ethernet mac address.
|
|
||||||
+The Name field is whatever is configured into the device as its name.
|
|
||||||
+The Usable field tells you whether or not the device supports the Bluetooth Handsfree Profile or Headset profile.
|
|
||||||
+The Type field tells you whether the device is usable as a Phone line (FXO) or a headset (FXS)
|
|
||||||
+The Port field is the number to put in the configuration file.
|
|
||||||
+
|
|
||||||
+Choose which device(s) you want to use and edit /etc/asterisk/mobile.conf. There is a sample included
|
|
||||||
+with the Asterisk source under configs/mobile.conf.sample.
|
|
||||||
+
|
|
||||||
+Assuming we want to use the devices above, mobile.conf needs to look like this :-
|
|
||||||
+
|
|
||||||
+===================================================================================
|
|
||||||
+;
|
|
||||||
+; mobile.conf
|
|
||||||
+;
|
|
||||||
+
|
|
||||||
+[general]
|
|
||||||
+interval=60 ; Number of seconds between trying to connect to devices.
|
|
||||||
+
|
|
||||||
+; The following is a list of the devices we deal with.
|
|
||||||
+; Every device listed below will be available for calls in and out of Asterisk.
|
|
||||||
+; Discovered devices not in this list are not available.
|
|
||||||
+; Use the CLI command 'mobile search' to discover devices.
|
|
||||||
+; Use the CLI command 'mobile show devices' to see device status.
|
|
||||||
+;
|
|
||||||
+; To place a call use Dial(Mobile/[device]/NNN.....) in your dialplan.
|
|
||||||
+
|
|
||||||
+[dave]
|
|
||||||
+address=00:12:56:90:6E:00
|
|
||||||
+port=4
|
|
||||||
+context=incoming-mobile
|
|
||||||
+
|
|
||||||
+[headset]
|
|
||||||
+address=00:0B:9E:11:74:A5
|
|
||||||
+port=1
|
|
||||||
+type=headset
|
|
||||||
+===================================================================================
|
|
||||||
+
|
|
||||||
+Be sure to configure the right bd address and port number from the search. If you want inbound
|
|
||||||
+calls on a device to go to a specific context, add a context= line, otherwise the default will
|
|
||||||
+be used. The 'id' of the device [bitinbrackets] can be anything you like, just make the unique.
|
|
||||||
+
|
|
||||||
+If your are configuring a Headset be sure to include the type=headset line, if left out it defaults
|
|
||||||
+to phone.
|
|
||||||
+
|
|
||||||
+Having done this, unload chan_mobile and load it again.
|
|
||||||
+
|
|
||||||
+The CLI command 'mobile show devices' can be used at any time to show the status of configured devices,
|
|
||||||
+and whether or not the device is capable of sending / receiving SMS via bluetooth.
|
|
||||||
+
|
|
||||||
+*CLI> mobile show devices
|
|
||||||
+ID Address Connected State SMS
|
|
||||||
+blackberry 00:0F:86:0E:AE:42 Yes Free Yes
|
|
||||||
+dave 00:12:56:90:6E:00 Yes Free No
|
|
||||||
+headset 00:0B:9E:11:74:A5 Yes Free No
|
|
||||||
+*CLI>
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+All being well Asterisk will now try and establish a connection to each configured device. If it cant
|
|
||||||
+it will retry after 'interval' seconds, infinately.
|
|
||||||
+
|
|
||||||
+This means that as your cell phone comes into range and goes out of range, Asterisk will automatically
|
|
||||||
+connect and disconnect from it. You dont need to worry about it.
|
|
||||||
+
|
|
||||||
+As each phone is connected you will see a message on the Asterisk console :-
|
|
||||||
+
|
|
||||||
+ Loaded chan_mobile.so => (Bluetooth Mobile Device Channel Driver)
|
|
||||||
+ -- Bluetooth Device blackberry has connected.
|
|
||||||
+ -- Bluetooth Device dave has connected.
|
|
||||||
+
|
|
||||||
+If someone calls your cell phone now, Asterisk will handle the call and it will be sent into the
|
|
||||||
+context you specified, or the default context. Mostly likely this means some SIP phone somewhere will
|
|
||||||
+ring, pick it up and take the call.
|
|
||||||
+
|
|
||||||
+To make outbound calls, add something to you Dialplan like the following :- (modify to suit)
|
|
||||||
+
|
|
||||||
+; Calls via TU500
|
|
||||||
+exten => _9X.,1,Dial(Mobile/dave/${EXTEN:1},45)
|
|
||||||
+exten => _9X.,n,Hangup
|
|
||||||
+; Calls via Blackberry
|
|
||||||
+exten => _8X.,1,Dial(Mobile/blackberry/${EXTEN:1},45)
|
|
||||||
+exten => _8X.,n,Hangup
|
|
||||||
+
|
|
||||||
+Pick up a SIP phone and dial 9<number of pizza shop> and the call vill go via the device 'dave' in
|
|
||||||
+mobile.conf.
|
|
||||||
+
|
|
||||||
+To incoming calls to a headset do something like this :-
|
|
||||||
+
|
|
||||||
+[incoming-context]
|
|
||||||
+exten => s,1,Dial(Mobile/headset,30)
|
|
||||||
+exten => s,n,Hangup()
|
|
||||||
+
|
|
||||||
+To dial out on a headset, you need to use some other mechanism, because the headset is not likely
|
|
||||||
+to have all the needed buttons on it. res_clioriginate is good for this :-
|
|
||||||
+
|
|
||||||
+*CLI> originate Mobile/headset extension NNNNN@context
|
|
||||||
+
|
|
||||||
+This will call your headset, once you answer Asterisk will call NNNNN at context context
|
|
||||||
+
|
|
||||||
+Dialplan hints :-
|
|
||||||
+
|
|
||||||
+chan_mobile supports 'device status' so you can do somthing like
|
|
||||||
+
|
|
||||||
+exten => 1234,hint,SIP/30&Mobile/dave&Mobile/blackberry
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+MobileStatus Application :-
|
|
||||||
+
|
|
||||||
+chan_mobile also registers an application named MobileStatus. You can use this in your Dialplan
|
|
||||||
+to determine the 'state' of a device.
|
|
||||||
+
|
|
||||||
+For example, suppose you wanted to call dave's extension, but only if he was in the office. You could
|
|
||||||
+test to see if his cell phone was attached to Asterisk, if it is dial his extension, otherwise dial his
|
|
||||||
+cell phone.
|
|
||||||
+
|
|
||||||
+exten => 40,1,MobileStatus(dave,DAVECELL)
|
|
||||||
+exten => 40,2,GotoIf($["${DAVECELL}" = "1"]?3:5)
|
|
||||||
+exten => 40,3,Dial(ZAP/g1/0427466412,45,tT)
|
|
||||||
+exten => 40,4,Hangup
|
|
||||||
+exten => 40,5,Dial(SIP/40,45,tT)
|
|
||||||
+exten => 40,6,Hangup
|
|
||||||
+
|
|
||||||
+MobileStatus sets the value of the given variable to :-
|
|
||||||
+
|
|
||||||
+1 = Disconnected. i.e. Device not in range of Asterisk, or turned off etc etc
|
|
||||||
+2 = Connected and Not on a call. i.e. Free
|
|
||||||
+3 = Connected and on a call. i.e. Busy
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+SMS Sending / Receiving
|
|
||||||
+
|
|
||||||
+If Asterisk has detected your cell phone is capable of SMS via bluetooth, you will be able to send and
|
|
||||||
+receive SMS.
|
|
||||||
+
|
|
||||||
+Incoming SMS's cause Asterisk to create an inbound call to the context you defined in mobile.conf or the default
|
|
||||||
+context if you did not define one. The call will start at extension 'sms'. Two channel variables will be available,
|
|
||||||
+SMSSRC = the number of the originator of the SMS and SMSTXT which is the text of the SMS.
|
|
||||||
+This is not a voice call, so grab the values of the variables and hang the call up.
|
|
||||||
+
|
|
||||||
+So, to handle incoming SMS's, do something like the following in your dialplan
|
|
||||||
+
|
|
||||||
+[incoming-mobile]
|
|
||||||
+exten => sms,1,Verbose(Incoming SMS from ${SMSSRC} ${SMSTXT})
|
|
||||||
+exten => sms,n,Hangup()
|
|
||||||
+
|
|
||||||
+The above will just print the message on the console.
|
|
||||||
+
|
|
||||||
+If you use res_jabber, you could do something like this :-
|
|
||||||
+
|
|
||||||
+[incoming-mobile]
|
|
||||||
+exten => sms,1,JabberSend(transport,user@jabber.somewhere.com,SMS from ${SMSRC} ${SMSTXT})
|
|
||||||
+exten => sms,2,Hangup()
|
|
||||||
+
|
|
||||||
+To send an SMS, use the application MobileSendSMS like the following :-
|
|
||||||
+
|
|
||||||
+exten => 99,1,MobileSendSMS(dave,0427123456,Hello World)
|
|
||||||
+
|
|
||||||
+This will send 'Hello World' via device 'dave' to '0427123456'
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+DTMF Debouncing :-
|
|
||||||
+
|
|
||||||
+DTMF detection varies from phone to phone. There is a configuration variable that allows you to tune
|
|
||||||
+this to your needs. e.g. in mobile.conf
|
|
||||||
+
|
|
||||||
+[dave]
|
|
||||||
+address=00:12:56:90:6E:00
|
|
||||||
+port=4
|
|
||||||
+context=incoming-mobile
|
|
||||||
+dtmfskip=50
|
|
||||||
+
|
|
||||||
+change dtmfskip to suit your phone. The default is 200. The larger the number, the more chance of missed DTMF.
|
|
||||||
+The smaller the number the more chance of multiple digits being detected.
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+Debugging :-
|
|
||||||
+
|
|
||||||
+Different phone manufacturers have different interpretations of the Bluetooth Handsfree Profile Spec.
|
|
||||||
+This means that not all phones work the same way, particularly in the connection setup / initialisation
|
|
||||||
+sequence. I've tried to make chan_cellphone as general as possible, but it may need modification to
|
|
||||||
+support some phone i've never tested.
|
|
||||||
+
|
|
||||||
+The RIM Blackberry 7250 works extremely well. So does the LG TU500.
|
|
||||||
+
|
|
||||||
+Some phones, most notably Sony Ericsson 'T' series, dont quite conform to the Bluetooth HFP spec.
|
|
||||||
+chan_mobile will detect these and adapt accordingly. The T-610 and T-630 have been tested and
|
|
||||||
+work fine.
|
|
||||||
+
|
|
||||||
+If your phone doesnt behave has expected, turn on Asterisk debugging with 'core set debug 1'.
|
|
||||||
+
|
|
||||||
+This will log a bunch of debug messages indicating what the phone is doing, importantly the rfcomm
|
|
||||||
+conversation between Asterisk and the phone. This can be used to sort out what your phone is doing
|
|
||||||
+and make chan_mobile support it.
|
|
||||||
+
|
|
||||||
+Be aware also, that just about all cell phones behave differently. For example my LG TU500 wont dial unless
|
|
||||||
+the phone is a the 'idle' screen. i.e. if the phone is showing a 'menu' on the display, when you dial via
|
|
||||||
+Asterisk, the call will not work. chan_mobile handles this, but there may be other phones that do
|
|
||||||
+other things too...
|
|
||||||
+
|
|
||||||
+Important: Watch what your cell phone is doing the first few times. Asterisk wont make random calls but
|
|
||||||
+if chan_mobile fails to hangup for some reason and you get a huge bill from your telco, dont blame me.
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+Feedback, Support, Please can you make Cell Phone X work... etc :-
|
|
||||||
+
|
|
||||||
+email me at david.bowerman at gmail.com or dseeb_ on #asterisk & #asterisk-dev irc.
|
|
||||||
diff -Nru asterisk-addons-1.4.2/Makefile asterisk-addons-svn/Makefile
|
|
||||||
--- asterisk-addons-1.4.2/Makefile 2007-06-06 00:05:09.000000000 +0200
|
|
||||||
+++ asterisk-addons-svn/Makefile 2007-07-28 15:12:17.000000000 +0200
|
|
||||||
@@ -49,7 +49,7 @@
|
|
||||||
endif
|
|
||||||
MODULES_DIR=$(ASTLIBDIR)/modules
|
|
||||||
|
|
||||||
-MODS:=app_addon_sql_mysql app_saycountpl cdr_addon_mysql chan_ooh323 format_mp3 res_config_mysql
|
|
||||||
+MODS:=app_addon_sql_mysql app_saycountpl cdr_addon_mysql chan_ooh323 format_mp3 res_config_mysql chan_mobile
|
|
||||||
|
|
||||||
SELECTED_MODS:=$(patsubst %,%.so,$(filter-out $(MENUSELECT_ADDONS),$(MODS)))
|
|
||||||
|
|
||||||
@@ -143,6 +143,9 @@
|
|
||||||
app_addon_sql_mysql.so: app_addon_sql_mysql.o
|
|
||||||
$(CC) $(SOLINK) -o $@ $< $(MYSQLCLIENT_LIB)
|
|
||||||
|
|
||||||
+chan_mobile.so: chan_mobile.o
|
|
||||||
+ $(CC) $(SOLINK) -o $@ $< $(BLUETOOTH_LIB)
|
|
||||||
+
|
|
||||||
chan_ooh323.so:
|
|
||||||
@if [ ! -f asterisk-ooh323c/Makefile ] ; then \
|
|
||||||
cd asterisk-ooh323c && ./configure ; \
|
|
||||||
@@ -186,6 +189,8 @@
|
|
||||||
menuselect.makeopts menuselect.makedeps: menuselect/menuselect menuselect-tree
|
|
||||||
@menuselect/menuselect --check-deps $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts
|
|
||||||
|
|
||||||
+menuconfig: menuselect
|
|
||||||
+
|
|
||||||
menuselect: menuselect/menuselect menuselect-tree
|
|
||||||
-@menuselect/menuselect $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts && echo "menuselect changes saved!" || echo "menuselect changes NOT saved!"
|
|
||||||
|
|
||||||
diff -Nru asterisk-addons-1.4.2/makeopts.in asterisk-addons-svn/makeopts.in
|
|
||||||
--- asterisk-addons-1.4.2/makeopts.in 2007-05-14 18:22:44.000000000 +0200
|
|
||||||
+++ asterisk-addons-svn/makeopts.in 2007-06-04 19:11:00.000000000 +0200
|
|
||||||
@@ -33,6 +33,9 @@
|
|
||||||
sharedstatedir = @sharedstatedir@
|
|
||||||
sysconfdir = @sysconfdir@
|
|
||||||
|
|
||||||
+BLUETOOTH_LIB=@BLUETOOTH_LIB@
|
|
||||||
+BLUETOOTH_INCLUDE=@BLUETOOTH_INCLUDE@
|
|
||||||
+
|
|
||||||
CURSES_LIB=@CURSES_LIB@
|
|
||||||
CURSES_INCLUDE=@CURSES_INCLUDE@
|
|
||||||
|
|
||||||
diff -Nru asterisk-addons-1.4.2/menuselect-tree asterisk-addons-svn/menuselect-tree
|
|
||||||
--- asterisk-addons-1.4.2/menuselect-tree 2007-05-14 18:22:44.000000000 +0200
|
|
||||||
+++ asterisk-addons-svn/menuselect-tree 2007-06-04 19:11:00.000000000 +0200
|
|
||||||
@@ -13,6 +13,10 @@
|
|
||||||
<depend>mysqlclient</depend>
|
|
||||||
<depend>asterisk</depend>
|
|
||||||
</member>
|
|
||||||
+ <member name="chan_mobile" remove_on_change="chan_mobile.so chan_mobile.o" displayname="Bluetooth Mobile Device channel driver">
|
|
||||||
+ <depend>bluetooth</depend>
|
|
||||||
+ <depend>asterisk</depend>
|
|
||||||
+ </member>
|
|
||||||
<member name="chan_ooh323" displayname="Objective Systems H.323 Channel Driver">
|
|
||||||
<depend>asterisk</depend>
|
|
||||||
</member>
|
|
||||||
--- asterisk-addons-1.4.2/chan_mobile.c 1970-01-01 01:00:00.000000000 +0100
|
|
||||||
+++ asterisk-addons-svn/chan_mobile.c 2007-07-29 13:30:43.000000000 +0200
|
|
||||||
@@ -0,0 +1,1867 @@
|
@@ -0,0 +1,1867 @@
|
||||||
+/*
|
+/*
|
||||||
+ * Asterisk -- An open source telephony toolkit.
|
+ * Asterisk -- An open source telephony toolkit.
|
||||||
@ -2261,3 +1876,347 @@ diff -Nru asterisk-addons-1.4.2/menuselect-tree asterisk-addons-svn/menuselect-t
|
|||||||
+ .unload = unload_module,
|
+ .unload = unload_module,
|
||||||
+ .reload = reload_module,
|
+ .reload = reload_module,
|
||||||
+);
|
+);
|
||||||
|
diff -Nru asterisk-addons-1.4.6.org/configs/mobile.conf.sample asterisk-addons-1.4.6/configs/mobile.conf.sample
|
||||||
|
--- asterisk-addons-1.4.6.org/configs/mobile.conf.sample 1970-01-01 01:00:00.000000000 +0100
|
||||||
|
+++ asterisk-addons-1.4.6/configs/mobile.conf.sample 2008-03-06 08:38:14.000000000 +0100
|
||||||
|
@@ -0,0 +1,30 @@
|
||||||
|
+;
|
||||||
|
+; mobile.conf
|
||||||
|
+;
|
||||||
|
+
|
||||||
|
+[general]
|
||||||
|
+interval=60 ; Number of seconds between trying to connect to devices.
|
||||||
|
+
|
||||||
|
+; The following is a list of the devices we deal with.
|
||||||
|
+; Every device listed below will be available for calls in and out of Asterisk.
|
||||||
|
+; Discovered devices not in this list are not available.
|
||||||
|
+; Use the CLI command 'mobile search' to discover devices.
|
||||||
|
+; Use the CLI command 'mobile show devices' to see device status.
|
||||||
|
+;
|
||||||
|
+; To place out through a cell phone use Dial(Mobile/[device]/NNN.....) in your dialplan.
|
||||||
|
+; To call a headset use Dial(Mobile/[device]).
|
||||||
|
+
|
||||||
|
+;[dave]
|
||||||
|
+;address=00:12:56:90:6E:00
|
||||||
|
+;port=4
|
||||||
|
+;context=incoming-mobile
|
||||||
|
+
|
||||||
|
+;[blackberry]
|
||||||
|
+;address=00:0F:86:0E:AE:42
|
||||||
|
+;port=2
|
||||||
|
+;context=incoming-mobile
|
||||||
|
+
|
||||||
|
+;[headset]
|
||||||
|
+;address=00:0B:9E:11:74:A5
|
||||||
|
+;port=1
|
||||||
|
+;type=headset
|
||||||
|
diff -Nru asterisk-addons-1.4.6.org/configure.ac asterisk-addons-1.4.6/configure.ac
|
||||||
|
--- asterisk-addons-1.4.6.org/configure.ac 2008-02-13 23:58:11.000000000 +0100
|
||||||
|
+++ asterisk-addons-1.4.6/configure.ac 2008-03-06 08:38:14.000000000 +0100
|
||||||
|
@@ -161,13 +161,14 @@
|
||||||
|
# from here on down, library checking should be done in alphabetical order
|
||||||
|
# by the --with option name, to make things easier for the users :-)
|
||||||
|
|
||||||
|
+AST_EXT_LIB_SETUP([BLUETOOTH], [Bluetooth Support], [bluetooth])
|
||||||
|
AST_EXT_LIB_SETUP([CURSES], [curses], [curses])
|
||||||
|
AST_EXT_LIB_SETUP([NCURSES], [ncurses], [ncurses])
|
||||||
|
AST_EXT_LIB_SETUP([MYSQLCLIENT], [mysqlclient], [mysqlclient])
|
||||||
|
AST_EXT_LIB_SETUP([ASTERISK], [asterisk], [asterisk])
|
||||||
|
|
||||||
|
+AST_EXT_LIB_CHECK([BLUETOOTH], [bluetooth], [ba2str], [bluetooth/bluetooth.h])
|
||||||
|
AST_EXT_LIB_CHECK([CURSES], [curses], [initscr], [curses.h])
|
||||||
|
-
|
||||||
|
AST_EXT_LIB_CHECK([NCURSES], [ncurses], [initscr], [curses.h])
|
||||||
|
|
||||||
|
MYSQL_CONFIG=No
|
||||||
|
diff -Nru asterisk-addons-1.4.6.org/doc/chan_mobile.txt asterisk-addons-1.4.6/doc/chan_mobile.txt
|
||||||
|
--- asterisk-addons-1.4.6.org/doc/chan_mobile.txt 1970-01-01 01:00:00.000000000 +0100
|
||||||
|
+++ asterisk-addons-1.4.6/doc/chan_mobile.txt 2008-03-06 08:38:14.000000000 +0100
|
||||||
|
@@ -0,0 +1,262 @@
|
||||||
|
+chan_mobile
|
||||||
|
+
|
||||||
|
+Asterisk Channel Driver to allow Bluetooth Cell/Mobile Phones to be used as FXO devices, and Headsets as FXS devices.
|
||||||
|
+
|
||||||
|
+Features :-
|
||||||
|
+
|
||||||
|
+Multiple cell phones can be connected.
|
||||||
|
+Multiple headsets can be connected.
|
||||||
|
+Asterisk automatically connects to each configured cell phone / headset when it comes in range.
|
||||||
|
+CLI command to discover bluetooth devices.
|
||||||
|
+Inbound calls on the cell network to the cell phones are handled by Asterisk, just like inbound calls on a Zap channel.
|
||||||
|
+CLI passed through on inbound calls.
|
||||||
|
+Dial outbound on a cell phone using Dial(Mobile/device/nnnnnnn) in the dialplan.
|
||||||
|
+Dial a headset using Dial(Mobile/device) in the dialplan.
|
||||||
|
+Application MobileStatus can be used in the dialplan to see if a cell phone / headset is connected.
|
||||||
|
+Supports devicestate for dialplan hinting.
|
||||||
|
+Supports Inbound and Outbound SMS.
|
||||||
|
+
|
||||||
|
+Using chan_mobile :-
|
||||||
|
+
|
||||||
|
+In order to use chan_mobile, you must have a working bluetooth subsystem on your Asterisk box.
|
||||||
|
+This means a working bluetooth adapter, and the BlueZ packages.
|
||||||
|
+
|
||||||
|
+Any bluetooth adapter supported by the Linux kernel will do, including usb bluetooth dongles.
|
||||||
|
+
|
||||||
|
+The BlueZ package you need is bluez-utils. If you are using a GUI then you might want to install bluez-pin also.
|
||||||
|
+You also need libbluetooth, and libbluetooth-dev if you are compiling Asterisk from source.
|
||||||
|
+
|
||||||
|
+You need to get bluetooth working with your phone before attempting to use chan_mobile.
|
||||||
|
+This means 'pairing' your phone with your Asterisk box. I dont describe how to do this here as the process
|
||||||
|
+differs from distro to distro. You only need to pair once.
|
||||||
|
+
|
||||||
|
+However, the easist way to pair, is to use you cell phone to search for bluetooth devices, select your Asterisk box
|
||||||
|
+and enter the requested PIN.
|
||||||
|
+
|
||||||
|
+See www.bluez.org for other details about setting up Bluetooth under Linux.
|
||||||
|
+
|
||||||
|
+Assuming you have bluetooth working ok:-
|
||||||
|
+
|
||||||
|
+Load chan_mobile.so
|
||||||
|
+
|
||||||
|
+Search for your bluetooth devices using the CLI command 'mobile search'. Be patient with this command as
|
||||||
|
+it will take 8 - 10 seconds to do the discovery.
|
||||||
|
+
|
||||||
|
+Headsets will generally have to be put into 'pairing' mode before they will show up here.
|
||||||
|
+
|
||||||
|
+This will return something like the following :-
|
||||||
|
+
|
||||||
|
+*CLI> mobile search
|
||||||
|
+Address Name Usable Type Port
|
||||||
|
+00:12:56:90:6E:00 LG TU500 Yes Phone 4
|
||||||
|
+00:80:C8:35:52:78 Toaster No Headset 0
|
||||||
|
+00:0B:9E:11:74:A5 Hello II Plus Yes Headset 1
|
||||||
|
+00:0F:86:0E:AE:42 Daves Blackberry Yes Phone 7
|
||||||
|
+
|
||||||
|
+This is a list of all bluetooth devices seen and whether or not they are usable with chan_cellphone.
|
||||||
|
+The Address field contains the 'bd address' of the device. This is like an ethernet mac address.
|
||||||
|
+The Name field is whatever is configured into the device as its name.
|
||||||
|
+The Usable field tells you whether or not the device supports the Bluetooth Handsfree Profile or Headset profile.
|
||||||
|
+The Type field tells you whether the device is usable as a Phone line (FXO) or a headset (FXS)
|
||||||
|
+The Port field is the number to put in the configuration file.
|
||||||
|
+
|
||||||
|
+Choose which device(s) you want to use and edit /etc/asterisk/mobile.conf. There is a sample included
|
||||||
|
+with the Asterisk source under configs/mobile.conf.sample.
|
||||||
|
+
|
||||||
|
+Assuming we want to use the devices above, mobile.conf needs to look like this :-
|
||||||
|
+
|
||||||
|
+===================================================================================
|
||||||
|
+;
|
||||||
|
+; mobile.conf
|
||||||
|
+;
|
||||||
|
+
|
||||||
|
+[general]
|
||||||
|
+interval=60 ; Number of seconds between trying to connect to devices.
|
||||||
|
+
|
||||||
|
+; The following is a list of the devices we deal with.
|
||||||
|
+; Every device listed below will be available for calls in and out of Asterisk.
|
||||||
|
+; Discovered devices not in this list are not available.
|
||||||
|
+; Use the CLI command 'mobile search' to discover devices.
|
||||||
|
+; Use the CLI command 'mobile show devices' to see device status.
|
||||||
|
+;
|
||||||
|
+; To place a call use Dial(Mobile/[device]/NNN.....) in your dialplan.
|
||||||
|
+
|
||||||
|
+[dave]
|
||||||
|
+address=00:12:56:90:6E:00
|
||||||
|
+port=4
|
||||||
|
+context=incoming-mobile
|
||||||
|
+
|
||||||
|
+[headset]
|
||||||
|
+address=00:0B:9E:11:74:A5
|
||||||
|
+port=1
|
||||||
|
+type=headset
|
||||||
|
+===================================================================================
|
||||||
|
+
|
||||||
|
+Be sure to configure the right bd address and port number from the search. If you want inbound
|
||||||
|
+calls on a device to go to a specific context, add a context= line, otherwise the default will
|
||||||
|
+be used. The 'id' of the device [bitinbrackets] can be anything you like, just make the unique.
|
||||||
|
+
|
||||||
|
+If your are configuring a Headset be sure to include the type=headset line, if left out it defaults
|
||||||
|
+to phone.
|
||||||
|
+
|
||||||
|
+Having done this, unload chan_mobile and load it again.
|
||||||
|
+
|
||||||
|
+The CLI command 'mobile show devices' can be used at any time to show the status of configured devices,
|
||||||
|
+and whether or not the device is capable of sending / receiving SMS via bluetooth.
|
||||||
|
+
|
||||||
|
+*CLI> mobile show devices
|
||||||
|
+ID Address Connected State SMS
|
||||||
|
+blackberry 00:0F:86:0E:AE:42 Yes Free Yes
|
||||||
|
+dave 00:12:56:90:6E:00 Yes Free No
|
||||||
|
+headset 00:0B:9E:11:74:A5 Yes Free No
|
||||||
|
+*CLI>
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+All being well Asterisk will now try and establish a connection to each configured device. If it cant
|
||||||
|
+it will retry after 'interval' seconds, infinately.
|
||||||
|
+
|
||||||
|
+This means that as your cell phone comes into range and goes out of range, Asterisk will automatically
|
||||||
|
+connect and disconnect from it. You dont need to worry about it.
|
||||||
|
+
|
||||||
|
+As each phone is connected you will see a message on the Asterisk console :-
|
||||||
|
+
|
||||||
|
+ Loaded chan_mobile.so => (Bluetooth Mobile Device Channel Driver)
|
||||||
|
+ -- Bluetooth Device blackberry has connected.
|
||||||
|
+ -- Bluetooth Device dave has connected.
|
||||||
|
+
|
||||||
|
+If someone calls your cell phone now, Asterisk will handle the call and it will be sent into the
|
||||||
|
+context you specified, or the default context. Mostly likely this means some SIP phone somewhere will
|
||||||
|
+ring, pick it up and take the call.
|
||||||
|
+
|
||||||
|
+To make outbound calls, add something to you Dialplan like the following :- (modify to suit)
|
||||||
|
+
|
||||||
|
+; Calls via TU500
|
||||||
|
+exten => _9X.,1,Dial(Mobile/dave/${EXTEN:1},45)
|
||||||
|
+exten => _9X.,n,Hangup
|
||||||
|
+; Calls via Blackberry
|
||||||
|
+exten => _8X.,1,Dial(Mobile/blackberry/${EXTEN:1},45)
|
||||||
|
+exten => _8X.,n,Hangup
|
||||||
|
+
|
||||||
|
+Pick up a SIP phone and dial 9<number of pizza shop> and the call vill go via the device 'dave' in
|
||||||
|
+mobile.conf.
|
||||||
|
+
|
||||||
|
+To incoming calls to a headset do something like this :-
|
||||||
|
+
|
||||||
|
+[incoming-context]
|
||||||
|
+exten => s,1,Dial(Mobile/headset,30)
|
||||||
|
+exten => s,n,Hangup()
|
||||||
|
+
|
||||||
|
+To dial out on a headset, you need to use some other mechanism, because the headset is not likely
|
||||||
|
+to have all the needed buttons on it. res_clioriginate is good for this :-
|
||||||
|
+
|
||||||
|
+*CLI> originate Mobile/headset extension NNNNN@context
|
||||||
|
+
|
||||||
|
+This will call your headset, once you answer Asterisk will call NNNNN at context context
|
||||||
|
+
|
||||||
|
+Dialplan hints :-
|
||||||
|
+
|
||||||
|
+chan_mobile supports 'device status' so you can do somthing like
|
||||||
|
+
|
||||||
|
+exten => 1234,hint,SIP/30&Mobile/dave&Mobile/blackberry
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+MobileStatus Application :-
|
||||||
|
+
|
||||||
|
+chan_mobile also registers an application named MobileStatus. You can use this in your Dialplan
|
||||||
|
+to determine the 'state' of a device.
|
||||||
|
+
|
||||||
|
+For example, suppose you wanted to call dave's extension, but only if he was in the office. You could
|
||||||
|
+test to see if his cell phone was attached to Asterisk, if it is dial his extension, otherwise dial his
|
||||||
|
+cell phone.
|
||||||
|
+
|
||||||
|
+exten => 40,1,MobileStatus(dave,DAVECELL)
|
||||||
|
+exten => 40,2,GotoIf($["${DAVECELL}" = "1"]?3:5)
|
||||||
|
+exten => 40,3,Dial(ZAP/g1/0427466412,45,tT)
|
||||||
|
+exten => 40,4,Hangup
|
||||||
|
+exten => 40,5,Dial(SIP/40,45,tT)
|
||||||
|
+exten => 40,6,Hangup
|
||||||
|
+
|
||||||
|
+MobileStatus sets the value of the given variable to :-
|
||||||
|
+
|
||||||
|
+1 = Disconnected. i.e. Device not in range of Asterisk, or turned off etc etc
|
||||||
|
+2 = Connected and Not on a call. i.e. Free
|
||||||
|
+3 = Connected and on a call. i.e. Busy
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+SMS Sending / Receiving
|
||||||
|
+
|
||||||
|
+If Asterisk has detected your cell phone is capable of SMS via bluetooth, you will be able to send and
|
||||||
|
+receive SMS.
|
||||||
|
+
|
||||||
|
+Incoming SMS's cause Asterisk to create an inbound call to the context you defined in mobile.conf or the default
|
||||||
|
+context if you did not define one. The call will start at extension 'sms'. Two channel variables will be available,
|
||||||
|
+SMSSRC = the number of the originator of the SMS and SMSTXT which is the text of the SMS.
|
||||||
|
+This is not a voice call, so grab the values of the variables and hang the call up.
|
||||||
|
+
|
||||||
|
+So, to handle incoming SMS's, do something like the following in your dialplan
|
||||||
|
+
|
||||||
|
+[incoming-mobile]
|
||||||
|
+exten => sms,1,Verbose(Incoming SMS from ${SMSSRC} ${SMSTXT})
|
||||||
|
+exten => sms,n,Hangup()
|
||||||
|
+
|
||||||
|
+The above will just print the message on the console.
|
||||||
|
+
|
||||||
|
+If you use res_jabber, you could do something like this :-
|
||||||
|
+
|
||||||
|
+[incoming-mobile]
|
||||||
|
+exten => sms,1,JabberSend(transport,user@jabber.somewhere.com,SMS from ${SMSRC} ${SMSTXT})
|
||||||
|
+exten => sms,2,Hangup()
|
||||||
|
+
|
||||||
|
+To send an SMS, use the application MobileSendSMS like the following :-
|
||||||
|
+
|
||||||
|
+exten => 99,1,MobileSendSMS(dave,0427123456,Hello World)
|
||||||
|
+
|
||||||
|
+This will send 'Hello World' via device 'dave' to '0427123456'
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+DTMF Debouncing :-
|
||||||
|
+
|
||||||
|
+DTMF detection varies from phone to phone. There is a configuration variable that allows you to tune
|
||||||
|
+this to your needs. e.g. in mobile.conf
|
||||||
|
+
|
||||||
|
+[dave]
|
||||||
|
+address=00:12:56:90:6E:00
|
||||||
|
+port=4
|
||||||
|
+context=incoming-mobile
|
||||||
|
+dtmfskip=50
|
||||||
|
+
|
||||||
|
+change dtmfskip to suit your phone. The default is 200. The larger the number, the more chance of missed DTMF.
|
||||||
|
+The smaller the number the more chance of multiple digits being detected.
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+Debugging :-
|
||||||
|
+
|
||||||
|
+Different phone manufacturers have different interpretations of the Bluetooth Handsfree Profile Spec.
|
||||||
|
+This means that not all phones work the same way, particularly in the connection setup / initialisation
|
||||||
|
+sequence. I've tried to make chan_cellphone as general as possible, but it may need modification to
|
||||||
|
+support some phone i've never tested.
|
||||||
|
+
|
||||||
|
+The RIM Blackberry 7250 works extremely well. So does the LG TU500.
|
||||||
|
+
|
||||||
|
+Some phones, most notably Sony Ericsson 'T' series, dont quite conform to the Bluetooth HFP spec.
|
||||||
|
+chan_mobile will detect these and adapt accordingly. The T-610 and T-630 have been tested and
|
||||||
|
+work fine.
|
||||||
|
+
|
||||||
|
+If your phone doesnt behave has expected, turn on Asterisk debugging with 'core set debug 1'.
|
||||||
|
+
|
||||||
|
+This will log a bunch of debug messages indicating what the phone is doing, importantly the rfcomm
|
||||||
|
+conversation between Asterisk and the phone. This can be used to sort out what your phone is doing
|
||||||
|
+and make chan_mobile support it.
|
||||||
|
+
|
||||||
|
+Be aware also, that just about all cell phones behave differently. For example my LG TU500 wont dial unless
|
||||||
|
+the phone is a the 'idle' screen. i.e. if the phone is showing a 'menu' on the display, when you dial via
|
||||||
|
+Asterisk, the call will not work. chan_mobile handles this, but there may be other phones that do
|
||||||
|
+other things too...
|
||||||
|
+
|
||||||
|
+Important: Watch what your cell phone is doing the first few times. Asterisk wont make random calls but
|
||||||
|
+if chan_mobile fails to hangup for some reason and you get a huge bill from your telco, dont blame me.
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+Feedback, Support, Please can you make Cell Phone X work... etc :-
|
||||||
|
+
|
||||||
|
+email me at david.bowerman at gmail.com or dseeb_ on #asterisk & #asterisk-dev irc.
|
||||||
|
diff -Nru asterisk-addons-1.4.6.org/Makefile asterisk-addons-1.4.6/Makefile
|
||||||
|
--- asterisk-addons-1.4.6.org/Makefile 2008-02-13 23:58:11.000000000 +0100
|
||||||
|
+++ asterisk-addons-1.4.6/Makefile 2008-03-06 08:38:14.000000000 +0100
|
||||||
|
@@ -215,6 +215,8 @@
|
||||||
|
|
||||||
|
gmenuconfig: gmenuselect
|
||||||
|
|
||||||
|
+menuconfig: menuselect
|
||||||
|
+
|
||||||
|
menuselect: menuselect/menuselect menuselect-tree
|
||||||
|
-@menuselect/menuselect $(GLOBAL_MAKEOPTS) $(USER_MAKEOPTS) menuselect.makeopts && echo "menuselect changes saved!" || echo "menuselect changes NOT saved!"
|
||||||
|
|
||||||
|
diff -Nru asterisk-addons-1.4.6.org/makeopts.in asterisk-addons-1.4.6/makeopts.in
|
||||||
|
--- asterisk-addons-1.4.6.org/makeopts.in 2008-02-13 23:58:11.000000000 +0100
|
||||||
|
+++ asterisk-addons-1.4.6/makeopts.in 2008-03-06 08:38:14.000000000 +0100
|
||||||
|
@@ -34,6 +34,9 @@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
|
||||||
|
+BLUETOOTH_LIB=@BLUETOOTH_LIB@
|
||||||
|
+BLUETOOTH_INCLUDE=@BLUETOOTH_INCLUDE@
|
||||||
|
+
|
||||||
|
CURSES_LIB=@CURSES_LIB@
|
||||||
|
CURSES_INCLUDE=@CURSES_INCLUDE@
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
diff -ruN asterisk-addons-1.4.2-old/menuselect/Makefile asterisk-addons-1.4.2-new/menuselect/Makefile
|
diff -Nru asterisk-addons-1.4.5.org/menuselect/Makefile asterisk-addons-1.4.5/menuselect/Makefile
|
||||||
--- asterisk-addons-1.4.2-old/menuselect/Makefile 2007-06-06 00:01:45.000000000 +0200
|
--- asterisk-addons-1.4.5.org/menuselect/Makefile 2007-11-21 01:17:33.000000000 +0100
|
||||||
+++ asterisk-addons-1.4.2-new/menuselect/Makefile 2007-09-19 18:00:27.000000000 +0200
|
+++ asterisk-addons-1.4.5/menuselect/Makefile 2007-12-20 22:47:17.000000000 +0100
|
||||||
@@ -42,7 +42,7 @@
|
@@ -51,7 +51,7 @@
|
||||||
@$(MAKE) menuselect
|
$(OBJS) menuselect_gtk.o menuselect_curses.o menuselect_stub.o: autoconfig.h menuselect.h
|
||||||
|
|
||||||
autoconfig.h:
|
makeopts autoconfig.h: autoconfig.h.in makeopts.in
|
||||||
- @./configure $(CONFIGURE_SILENT) CC= LD= AR=
|
- @./configure $(CONFIGURE_SILENT) CC= LD= AR= CFLAGS=
|
||||||
+ @./configure $(CONFIGURE_SILENT) CC= LD= AR= LDFLAGS=
|
+ @./configure $(CONFIGURE_SILENT) CC= LD= AR= CFLAGS= LDFLAGS=
|
||||||
|
|
||||||
|
menuselect gmenuselect: mxml/libmxml.a
|
||||||
|
|
||||||
_gmenuselect: autoconfig.h
|
|
||||||
@$(MAKE) gmenuselect
|
|
||||||
|
19
net/asterisk-addons-1.4.x/patches/031-pthread_param.patch
Normal file
19
net/asterisk-addons-1.4.x/patches/031-pthread_param.patch
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
*** asterisk-addons-1.4.7/channels/ooh323c/src/ooCmdChannel.c.orig 2008-06-27 18:12:50.000000000 +0800
|
||||||
|
--- asterisk-addons-1.4.7/channels/ooh323c/src/ooCmdChannel.c 2008-06-27 18:12:11.000000000 +0800
|
||||||
|
***************
|
||||||
|
*** 37,43 ****
|
||||||
|
if ((ret = pipe(thePipe)) == -1) {
|
||||||
|
return OO_FAILED;
|
||||||
|
}
|
||||||
|
! pthread_mutex_init(&gCmdChanLock);
|
||||||
|
|
||||||
|
gH323ep.cmdSock = dup(thePipe[0]);
|
||||||
|
close(thePipe[0]);
|
||||||
|
--- 37,43 ----
|
||||||
|
if ((ret = pipe(thePipe)) == -1) {
|
||||||
|
return OO_FAILED;
|
||||||
|
}
|
||||||
|
! pthread_mutex_init(&gCmdChanLock, NULL);
|
||||||
|
|
||||||
|
gH323ep.cmdSock = dup(thePipe[0]);
|
||||||
|
close(thePipe[0]);
|
Loading…
x
Reference in New Issue
Block a user