[Home]

Summary:ASTERISK-14097: [patch] Cannot make or receive mobile calls.
Reporter:BrettS (ughnz)Labels:
Date Opened:2009-05-08 20:32:20Date Closed:2009-08-03 09:01:56
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Addons/chan_mobile
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) optional-sms1.diff
Description:Asterisk will connect to the mobile phone but when attempt to make an outgoing call the phone will dial, but when the remote party answers the cellphone will switch to "normal profile" and activate the handsfree mode. Asterisk will report all channels are busy.

Incoming calls are not answered.

No issue with addons 1.6.1.0 patched with audio1.diff

****** ADDITIONAL INFORMATION ******

Here is my setup:

- VIA PC-1 system. 1.5GHz CPU with 1G RAM.
- Centos 5.3
- Bluez 3.36
- CSR chipset dongle
- Vodafone 715 mobile
- Asterisk 1.6.1.0 Release
- DAHDI 2.1.0.4
- chan_mobile rev883 from trunk

mobile.conf:

;
; mobile.conf
; configuration file for chan_mobile
;

[general]
interval=30 ; Number of seconds between trying to connect to devices.

; The following is a list of adapters we use.
; id must be unique and address is the bdaddr of the adapter from hciconfig.
; Each adapter may only have one device (headset or phone) connected at a time.
; Add an [adapter] entry for each adapter you have.

[adapter]
id=blue
address=xx:xx:xx:xx:xx:xx
;forcemaster=yes
alignmentdetection=yes
;nocallsetup=yes

;[adapter]
;id=blue1
;address=xx:xx:xx:xx:xx:xx
;alignmentdetection=yes

; 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.
; Each device needs an adapter=xxxx entry which determines which bluetooth adapter is used.
; Use the CLI command 'mobile search' to discover devices.
; Use the CLI command 'mobile show devices' to see device status.
;
; To place a call out through a mobile phone use Dial(Mobile/[device]/NNN.....) in your dialplan.
; To call a headset use Dial(Mobile/[device]).

[TRUNK]
address=xx:xx:xx:xx:xx:xx ; the address of the phone
port=4 ; the rfcomm port number (from mobile search)
context=from-pstn ; dialplan context for incoming calls
adapter=blue ; adapter to use
dtmfskip=100

;[n95]
;address=xx:xx:xx:xx:xx:xx
;port=3
;context=from-pstn
;adapter=blue1
;dtmfskip=50

hcid.conf:

#
# HCI daemon configuration file.
#

# HCId options
options {
   # Automatically initialize new devices
   autoinit yes;

   # Security Manager mode
   # none - Security manager disabled
   # auto - Use local PIN for incoming connections
   # user - Always ask user for a PIN
   #
   security auto;

   # Pairing mode
   # none - Pairing disabled
   # multi - Allow pairing with already paired devices
   # once - Pair once and deny successive attempts
   pairing multi;

   # Default PIN code for incoming connections
   passkey "1234";
}

# Default settings for HCI devices
device xx:xx:xx:xx:xx:xx {
   # Local device name
   # %d - device id
   # %h - host name
   name "trixbox";

   # Local device class
   class 0x200408;

   # Default packet type
   #pkt_type DH1,DM1,HV1;

   # Inquiry and Page scan
   iscan enable; pscan enable;

   # Default link mode
   # none - no specific policy
   # accept - always accept incoming connections
   # master - become master on incoming connections,
   # deny role switch on outgoing connections
   lm accept;

   # Default link policy
   # none - no specific policy
   # rswitch - allow role switch
   # hold - allow hold mode
   # sniff - allow sniff mode
   # park - allow park mode
   #lp rswitch,hold,sniff,park;
}

device xx:xx:xx:xx:xx:xx {
name "trixbox1";
class 0x200408;
iscan enable; pscan enable;
lm accept;
}

hciconfig -a output:

hci0: Type: USB
       BD Address: xx:xx:xx:xx:xx:xx ACL MTU: 310:10 SCO MTU: 64:8
       UP RUNNING PSCAN
       RX bytes:384753 acl:376 sco:7232 events:487 errors:0
       TX bytes:180438 acl:225 sco:3426 commands:112 errors:0
       Features: 0xff 0xff 0x8f 0xfe 0x9b 0xf9 0x00 0x80
       Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
       Link policy:
       Link mode: SLAVE ACCEPT
       Name: 'trixbox'
       Class: 0x080408
       Service Classes: Capturing
       Device Class: Audio/Video, Hands-free
       HCI Ver: 2.0 (0x3) HCI Rev: 0xc5c LMP Ver: 2.0 (0x3) LMP Subver: 0xc5c
       Manufacturer: Cambridge Silicon Radio (10)

sdptool browse output:

Service Name: Voice Gateway
Service RecHandle: 0x10000
Service Class ID List:
 "Handsfree Audio Gateway" (0x111f)
 "Generic Audio" (0x1203)
Protocol Descriptor List:
 "L2CAP" (0x0100)
 "RFCOMM" (0x0003)
   Channel: 4
Language Base Attr List:
 code_ISO639: 0x656e
 encoding: 0x6a
 base_offset: 0x100
Profile Descriptor List:
 "Handsfree" (0x111e)
   Version: 0x0105

Service Name: A2DP Source
Service RecHandle: 0x10002
Service Class ID List:
 "Audio Source" (0x110a)
Protocol Descriptor List:
 "L2CAP" (0x0100)
   PSM: 25
 "AVDTP" (0x0019)
   uint16: 0x100
Language Base Attr List:
 code_ISO639: 0x656e
 encoding: 0x6a
 base_offset: 0x100
Profile Descriptor List:
 "Advanced Audio" (0x110d)
   Version: 0x0100

Service Name: AVRCP Target
Service RecHandle: 0x10003
Service Class ID List:
 "AV Remote Target" (0x110c)
Protocol Descriptor List:
 "L2CAP" (0x0100)
   PSM: 23
 "AVCTP" (0x0017)
   uint16: 0x100
Language Base Attr List:
 code_ISO639: 0x656e
 encoding: 0x6a
 base_offset: 0x100
Profile Descriptor List:
 "AV Remote" (0x110e)
   Version: 0x0100

Service Name: Serial Port
Service RecHandle: 0x10004
Service Class ID List:
 "Serial Port" (0x1101)
Protocol Descriptor List:
 "L2CAP" (0x0100)
 "RFCOMM" (0x0003)
   Channel: 16
Language Base Attr List:
 code_ISO639: 0x656e
 encoding: 0x6a
 base_offset: 0x100
Profile Descriptor List:
 "Serial Port" (0x1101)
   Version: 0x0100

Service Name: Information Synchronization
Service RecHandle: 0x10005
Service Class ID List:
 "IrMC Sync" (0x1104)
Protocol Descriptor List:
 "L2CAP" (0x0100)
 "RFCOMM" (0x0003)
   Channel: 17
 "OBEX" (0x0008)
Language Base Attr List:
 code_ISO639: 0x656e
 encoding: 0x6a
 base_offset: 0x100
Profile Descriptor List:
 "IrMC Sync" (0x1104)
   Version: 0x0100

Service Name: Object Push
Service RecHandle: 0x10006
Service Class ID List:
 "OBEX Object Push" (0x1105)
Protocol Descriptor List:
 "L2CAP" (0x0100)
 "RFCOMM" (0x0003)
   Channel: 18
 "OBEX" (0x0008)
Language Base Attr List:
 code_ISO639: 0x656e
 encoding: 0x6a
 base_offset: 0x100
Profile Descriptor List:
 "OBEX Object Push" (0x1105)
   Version: 0x0100

Service Name: File Transfer
Service RecHandle: 0x10007
Service Class ID List:
 "OBEX File Transfer" (0x1106)
Protocol Descriptor List:
 "L2CAP" (0x0100)
 "RFCOMM" (0x0003)
   Channel: 19
 "OBEX" (0x0008)
Language Base Attr List:
 code_ISO639: 0x656e
 encoding: 0x6a
 base_offset: 0x100
Profile Descriptor List:
 "OBEX File Transfer" (0x1106)
   Version: 0x0100
Comments:By: BrettS (ughnz) 2009-05-11 03:00:13

Here is a debug dump of the phone init:
[May 11 18:06:46] VERBOSE[14209] chan_mobile.c:     -- Bluetooth Device TRUNK has connected, initilizing...
[May 11 18:06:46] DEBUG[14258] chan_mobile.c: rfcomm_write() (12) [AT+BRSF=4
]
[May 11 18:06:46] DEBUG[14258] chan_mobile.c: [TRUNK] +BRSF: 491
[May 11 18:06:46] DEBUG[14258] chan_mobile.c: [TRUNK] OK
[May 11 18:06:46] DEBUG[14258] chan_mobile.c: [TRUNK] BSRF sent successfully
[May 11 18:06:46] DEBUG[14258] chan_mobile.c: rfcomm_write() (12) [AT+CIND=?
]
[May 11 18:06:46] DEBUG[14258] chan_mobile.c: [TRUNK] +CIND: ("service",(0,1)),("call",(0,1)),("callsetup",(0-3)),("signal",(0-5)),("battchg",(0-5)),("roam",(0,1)),("callheld",(0-2))
[May 11 18:06:46] DEBUG[14258] chan_mobile.c: [TRUNK] OK
[May 11 18:06:46] DEBUG[14258] chan_mobile.c: [TRUNK] CIND test sent successfully
[May 11 18:06:46] DEBUG[14258] chan_mobile.c: rfcomm_write() (12) [AT+CIND?
]
[May 11 18:06:46] DEBUG[14258] chan_mobile.c: [TRUNK] +CIND: 1,0,0,3,5,0,0
[May 11 18:06:46] DEBUG[14258] chan_mobile.c: [TRUNK] OK
[May 11 18:06:46] DEBUG[14258] chan_mobile.c: [TRUNK] CIND sent successfully
[May 11 18:06:46] DEBUG[14258] chan_mobile.c: rfcomm_write() (12) [AT+CMER=3,0,0,1
]
[May 11 18:06:46] DEBUG[14258] chan_mobile.c: [TRUNK] OK
[May 11 18:06:46] DEBUG[14258] chan_mobile.c: [TRUNK] CMER sent successfully
[May 11 18:06:46] DEBUG[14258] chan_mobile.c: rfcomm_write() (12) [AT+CLIP=1
]
[May 11 18:06:46] DEBUG[14258] chan_mobile.c: [TRUNK] +BSIR: 0
[May 11 18:06:46] DEBUG[14258] chan_mobile.c: [TRUNK] ignoring unknown message: +BSIR: 0
[May 11 18:06:46] DEBUG[14258] chan_mobile.c: [TRUNK] OK
[May 11 18:06:46] DEBUG[14258] chan_mobile.c: [TRUNK] caling line indication enabled
[May 11 18:06:46] DEBUG[14258] chan_mobile.c: rfcomm_write() (12) [AT+VGS=15
]
[May 11 18:06:46] VERBOSE[14258] chan_mobile.c:     -- Bluetooth Device TRUNK initialized and ready.
[May 11 18:06:46] DEBUG[14258] chan_mobile.c: [TRUNK] OK
[May 11 18:06:46] DEBUG[14258] chan_mobile.c: [TRUNK] volume level synchronization successful
[May 11 18:06:46] DEBUG[14258] chan_mobile.c: rfcomm_write() (12) [AT+CMGF=1
]
[May 11 18:06:47] DEBUG[14258] chan_mobile.c: [TRUNK] +CIEV: 5,3
[May 11 18:06:53] DEBUG[14258] chan_mobile.c: [TRUNK] +CIEV: 4,4

Here is a debug dump of an outgoing call:
[May 11 18:06:34] DEBUG[14256] pbx.c: Launching 'Dial'
[May 11 18:06:34] VERBOSE[14256] pbx.c:     -- Executing [s@macro-dialout-trunk:26] �[1;36;40mDial�[0;37;40m("�[1;35;40mSIP/4000-0877f208�[0;37;40m", "�[1;35;40mMobile/TRUNK/777,300,�[0;37;40m") in new stack
[May 11 18:06:34] DEBUG[14256] rtp.c: Channel 'Mobile/TRUNK-2de5' has no RTP, not doing anything
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable DIALEDTIME.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable ANSWEREDTIME.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable DIALEDPEERNAME.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable DIALEDPEERNUMBER.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable DIALSTATUS.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable MACRO_DEPTH.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable the_num.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable post_num.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable pre_num.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable MACRO_PRIORITY.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable MACRO_CONTEXT.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable MACRO_EXTEN.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable ARG1.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable custom.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable OUTNUM.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable TRUNKOUTCID.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable EMERGENCYCID.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable USEROUTCID.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable DB_RESULT.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable DIAL_TRUNK_OPTIONS.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable OUTBOUND_GROUP.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable DIAL_NUMBER.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable DIAL_TRUNK.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable ARG4.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable ARG3.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable ARG2.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable AGISTATUS.
[May 11 18:06:34] DEBUG[14256] channel.c: Copying soft-transferable variable NODEST.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable REALCALLERIDNUM.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable AMPUSERCID.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable AMPUSERCIDNAME.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable AMPUSER.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable SIPCALLID.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable SIPDOMAIN.
[May 11 18:06:34] DEBUG[14256] channel.c: Not copying variable SIPURI.
[May 11 18:06:34] DEBUG[14256] chan_mobile.c: Calling TRUNK/777 on Mobile/TRUNK-2de5
[May 11 18:06:34] DEBUG[14256] chan_mobile.c: rfcomm_write() (12) [ATD777;
]
[May 11 18:06:34] VERBOSE[14256] app_dial.c:     -- Called TRUNK/777
[May 11 18:06:34] DEBUG[14256] channel.c: Set channel Mobile/TRUNK-2de5 to read format g729
[May 11 18:06:34] DEBUG[14256] channel.c: Set channel SIP/4000-0877f208 to read format slin
[May 11 18:06:34] DEBUG[14255] chan_mobile.c: [TRUNK] OK
[May 11 18:06:34] DEBUG[14255] chan_mobile.c: [TRUNK] sms text mode enabled
[May 11 18:06:34] DEBUG[14255] chan_mobile.c: rfcomm_write() (12) [AT+CNMI=3,1,0,0,0
]
[May 11 18:06:34] DEBUG[14255] chan_mobile.c: [TRUNK] +CIEV: 3,2
[May 11 18:06:34] VERBOSE[14255] chan_mobile.c:     -- [TRUNK] user dialed from handset, disconnecting
[May 11 18:06:34] DEBUG[14255] chan_mobile.c: [TRUNK] device disconnected, hanging up owner
[May 11 18:06:34] VERBOSE[14255] chan_mobile.c:     -- Bluetooth Device TRUNK has disconnected.
[May 11 18:06:34] DEBUG[14256] channel.c: Hanging up channel 'Mobile/TRUNK-2de5'
[May 11 18:06:34] DEBUG[14256] chan_mobile.c: [TRUNK] hanging up device
[May 11 18:06:34] VERBOSE[14256] app_dial.c:   == Everyone is busy/congested at this time (1:0/0/1)
[May 11 18:06:34] DEBUG[14256] rtp.c: Channel '<unspecified>' has no RTP, not doing anything
[May 11 18:06:34] DEBUG[14256] app_dial.c: Exiting with DIALSTATUS=CHANUNAVAIL.

By: BrettS (ughnz) 2009-05-30 21:55:14

Update:

Tried my N95 with the latest trunk version and no problems with incoming or outgoing calls, so I suspect the Vodafone 715 is not happy with what ever changes have been made with the AT commands.

Looking at the debug messages it seems the phone is stuck in SMS mode after the initialisation command sequence.

Is there a way to disable the SMS detection / functionality and then I can test again to see if my suspicions are correct?

By: Matthew Nicholson (mnicholson) 2009-06-03 18:33:47

hmm...  That looks a little strange.  Like the phone never finishes initializing.  Adding a option to disable sms support may work.  I'll try and post a patch for that soon.

By: BrettS (ughnz) 2009-06-13 00:59:52

Downloaded latest chan_mobile from svn and commented out the code to init sms and phone works for both incoming and outgoing calls, so can confirm the SMS init is the issue.

By: Matthew Nicholson (mnicholson) 2009-07-15 12:54:53

Please test the patch I just uploaded.  It adds an 'sms' option that can be set to 'yes' or 'no'.

By: BrettS (ughnz) 2009-07-18 07:07:20

Tried to patch against addons-1.6.1.1-rc2 and all chunks failed.

What do I patch against?

By: Matthew Nicholson (mnicholson) 2009-07-20 10:26:41

Apply the patch to asterisk trunk.

By: BrettS (ughnz) 2009-07-31 05:35:17

Thanks. Will hopefully get a chance to test this weekend.

By: BrettS (ughnz) 2009-07-31 23:37:58

Can confirm patch works 100% no problems getting the phone to init.

Can also confirm that DISA works with SVN, yahhhhh!!!

Sorry about the other bug report over the DISA. I could not figure out if the fix had gone into asterisk code or addons code.

I assume the DISA fix was both an asterisk code and addons code fix?

Many Thanks, Brett.

By: Matthew Nicholson (mnicholson) 2009-08-03 08:59:08

The DISA fix is in asterisk addons 1.6.2 and asterisk trunk SVN.  Addons has been merged into trunk for all releases after 1.6.2.

By: Digium Subversion (svnbot) 2009-08-03 09:01:55

Repository: asterisk
Revision: 209993

U   trunk/addons/chan_mobile.c
U   trunk/configs/chan_mobile.conf.sample

------------------------------------------------------------------------
r209993 | mnicholson | 2009-08-03 09:01:54 -0500 (Mon, 03 Aug 2009) | 8 lines

Add an 'sms' option to mobile.conf to manually enable or disable SMS support.

(closes issue ASTERISK-14097)
Reported by: ughnz
Patches:
     optional-sms1.diff uploaded by mnicholson (license 96)
Tested by: ughnz, mnicholson

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=209993