chan_mobile with actual asterisk 1.4.9

Hello,
i have the actual asterisk 1.4.9 installed and will install the asterisk-addons (actual version out of cvs) - but chan_mobile will not compile:

gcc -g -c -fPIC -fPIC -o chan_mobile.o chan_mobile.c chan_mobile.c: In function 'mbl_read': chan_mobile.c:654: error: expected expression before '<<' token chan_mobile.c:684: error: invalid storage class for function 'mbl_write' chan_mobile.c: In function 'mbl_write': chan_mobile.c:727: error: invalid storage class for function 'mbl_fixup' chan_mobile.c:739: error: invalid storage class for function 'mbl_devicestate' chan_mobile.c:767: error: invalid storage class for function 'mbl_new' chan_mobile.c:807: error: invalid storage class for function 'rfcomm_connect' chan_mobile.c:833: error: invalid storage class for function 'rfcomm_write' chan_mobile.c:864: error: invalid storage class for function 'rfcomm_read' chan_mobile.c:920: error: invalid storage class for function 'sco_connect' chan_mobile.c:953: error: invalid storage class for function 'sdp_search' chan_mobile.c: In function 'sdp_search': chan_mobile.c:989: error: expected expression before '}' token chan_mobile.c: In function 'mbl_write': chan_mobile.c:1011: error: invalid storage class for function 'sdp_register' chan_mobile.c:1083: error: invalid storage class for function 'do_monitor_phone' chan_mobile.c:1442: error: invalid storage class for function 'do_monitor_headset' chan_mobile.c:1517: error: invalid storage class for function 'start_monitor' chan_mobile.c:1548: error: invalid storage class for function 'do_discovery' chan_mobile.c:1583: error: invalid storage class for function 'do_sco_listen' chan_mobile.c: In function 'do_sco_listen': chan_mobile.c:1647: error: expected expression before '}' token chan_mobile.c: In function 'mbl_write': chan_mobile.c:1656: error: invalid storage class for function 'mbl_load_config' chan_mobile.c:1726: error: invalid storage class for function 'reload_module' chan_mobile.c:1733: error: invalid storage class for function 'unload_module' chan_mobile.c:1782: error: invalid storage class for function 'load_module' chan_mobile.c:1838: error: initializer element is not constant chan_mobile.c:1838: error: (near initialization for '__mod_info.load') chan_mobile.c:1838: error: initializer element is not constant chan_mobile.c:1838: error: (near initialization for '__mod_info.unload') chan_mobile.c:1838: error: initializer element is not constant chan_mobile.c:1838: error: (near initialization for '__mod_info.reload') chan_mobile.c:1838: error: invalid storage class for function '__reg_module' chan_mobile.c:1838: error: invalid storage class for function '__unreg_module' chan_mobile.c:1838: error: expected declaration or statement at end of input chan_mobile.c: In function 'mbl_read': chan_mobile.c:1838: error: expected declaration or statement at end of input make[1]: *** [chan_mobile.o] Fehler 1 rm app_saycountpl.o make[1]: Leaving directory `/usr/src/asterisk-addons' make: *** [all] Fehler 2 SERVER:/usr/src/asterisk-addons#

Any hints?

regards
thorsten

Hello,
I have successfully compiled chan_mobile from svn r.421 against asterisk 1.4.10.

So give it a try again, maybe they fixed something.

Also please check if you are using recent libbluetooth-dev or bluez-libs.

My system is openSUSE 10.2 with bluez-libs-3.12-1 and kernel 2.6.22 from kotd.

However, chan_mobile r421 doesn’t load to asterisk 1.4.10

It is because change ast_log -> ast_debug, which is there since r408.

So options are

  • get svn r 407 of asterisk_addons (no 2 concurent devices)
  • get asterisk itself from svn too, not only addons
  • patch chan_mobile.c and change calls to ast_debug

Tried svn version of asterisk with svn chan_mobile
SVN-trunk-r78649
asterisk-addons r421

and got segfault after receiving a call:

Aug 8 22:40:55] NOTICE[961] chan_mobile.c: sco_socket returns 26…
[Aug 8 22:40:55] NOTICE[961] chan_mobile.c: about to close the pvt-sco_socket and set it ns
[Aug 8 22:40:55] NOTICE[961] chan_mobile.c: About to accept the sco_socket…
Segmentation fault

Hello,
I have successfully loaded chan_mobile r421 to asterisk 1.4.10.
The only needed change was to search and replace in chan_mobile.c
orig: ast_debug(1,
patched: ast_log(LOG_DEBUG,