[Home]

Summary:ASTERISK-28934: chan_mobile won't load without chan_alsa
Reporter:Pete Kirkham (pkirkham)Labels:
Date Opened:2020-06-04 11:58:01Date Closed:2020-06-08 09:38:33
Priority:MinorRegression?
Status:Closed/CompleteComponents:Addons/chan_mobile
Versions:16.10.0 Frequency of
Occurrence
Related
Issues:
Environment:ubuntu 18.04 asterisk 16.10.0Attachments:
Description:I didn't think I needed chan_alsa so I excluded it from the build but chan_mobile won't load without it.
Comments:By: Asterisk Team (asteriskteam) 2020-06-04 11:58:03.044-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

By: George Joseph (gjoseph) 2020-06-04 12:41:09.949-0500

Pete, I can's reproduce this.  I did a build with chan_mobile but without chan_alsa and chan_mobile loaded fine (after I created a good config file).

Can you give me the exact errors you get and a copy of your chan_mobile.conf file?


By: Pete Kirkham (pkirkham) 2020-06-06 04:43:22.743-0500

Here are the error messages. I made chan_mobile a required in modules.conf so the load will abort.


[Jun  4 18:23:49] VERBOSE[29797] loader.c: Loading chan_mobile.so.
[Jun  4 18:23:49] ERROR[29797] chan_mobile.c: Unable to listen sco listener socket.
[Jun  4 18:23:49] ERROR[29797] chan_mobile.c: Skipping adapter blue. Error binding audio connection listerner socket.
[Jun  4 18:23:49] ERROR[29797] chan_mobile.c: ***********************************************************************
No adapters could be loaded from the configuration file.
Please review mobile.conf. See sample for details.
***********************************************************************
[Jun  4 18:23:49] ERROR[29797] chan_mobile.c: Errors reading config file chan_mobile.conf. Not loading module.
[Jun  4 18:23:49] ERROR[29797] loader.c: *** Failed to load required module chan_mobile.so
[Jun  4 18:23:49] ERROR[29797] asterisk.c: Module initialization failed.  ASTERISK EXITING!

Here is chan_mobile.conf
;
; chan_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=5C:F3:70:75:26:08

;forcemaster=yes ; attempt to force adapter into master mode. default is no.
;alignmentdetection=yes  ; enable this if you sometimes get 'white noise' on asterisk side of the call
; its a bug in the bluetooth adapter firmware, enabling this will compensate for it.
; default is no.


; 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.....) or Dial(Mobile/gn/NNN......) in your dialplan.
; To call a headset use Dial(Mobile/[device]).

[galaxy]
address=64:89:F1:C5:FE:5E ; Galaxy A40
port=3 ; the rfcomm port number (from mobile search)
context=KFONE-default ; dialplan context for incoming calls
adapter=blue ; adapter to use
group=1 ; this phone is in channel group 1

when I built including chan_alsa, the problem disappeared.
Best regards,
Pete

By: George Joseph (gjoseph) 2020-06-08 08:36:20.355-0500

I just tried your config and had no problems.  The "Unable to listen sco listener socket" message would imply a permissions or environmental issue somewhere outside Asterisk.  Do you have Pulse Audio running?  What user does Asterisk run as?

chan_mobile is in "extended" support which means it's supported only by the community.  I think your best bet at this time is to ask for help on the community forums.  https://community.asterisk.org.


By: Pete Kirkham (pkirkham) 2020-06-08 09:28:56.353-0500

Thanks George. Asterisk is running as root since I'm only in a test environment. Since generating and loading chan_alsa solved the problem for me I don't have any other issue. So solved as far as I'm concerned.

By: George Joseph (gjoseph) 2020-06-08 09:38:17.751-0500

Gotcha.