chan_mobile segmentation fault

chan_mobile is in:
svn.digium.com/view/asterisk-addons/trunk/
revision 384

Working bluetooth stack:

root@core:/etc/asterisk# hciconfig
hci0: Type: USB
BD Address: 00:0B:0D:0A:E5:57 ACL MTU: 120:20 SCO MTU: 0:0
UP RUNNING
RX bytes:457 acl:0 sco:0 events:25 errors:0
TX bytes:89 acl:0 sco:0 commands:21 errors:0

root@core:/etc/asterisk#

default mobile.conf

*CLI> module load chan_mobile.so
== Parsing ‘/etc/asterisk/mobile.conf’: Found
Segmentation fault
root@core:~#

Slackware 11
kernel 2.6.21.1
asterisk 1.4.4
bluez-libs-3.10
bluez-utils-3.10.1

USB bluetooth dongle.

Im getting the same thing… IM running 1.4.4 on a amd64 system. was wondering if that could be the problem… Im using the bluez 3.11 though… Im also running the 64bit version of slakware. Also tried using the latest SVN version of asterisk and still had the seg fault. started with kernel 2.6.18 then upgraded to 2.6.21.3 both kernels had the same result.

I don’t think it’s about 64bit procesor…I have 32bit procesor…same result.

edit

Try this and see if it works on your system…

in the load_module() function of chan_mobile.c, if you comment out the line :-

sdp_session = sdp_register();

recompile and see if that makes a difference.

The guy that wrote the module looked at my backtrace and found the above… Whats weird is both you and I have slackware systems and I cant find any other posts about problems with this module.

This worked on my case (at least the module is now loading) have not tested functionality yet. Your mileage may vary.

make[2]: Leaving directory /kituri/voip/asterisk-1.4/add-on svn/trunk/menuselect' make[1]: Leaving directory/kituri/voip/asterisk-1.4/add-on svn/trunk/menuselect’
make[1]: Entering directory /kituri/voip/asterisk-1.4/add-on svn/trunk' build_tools/mkdep -fPIC -fPIC chan_mobile.c chan_mobile.c:1816:3: invalid preprocessing directive #sdp_session gcc -g -c -fPIC -fPIC -o chan_mobile.o chan_mobile.c chan_mobile.c:1816:3: invalid preprocessing directive #sdp_session make[1]: *** [chan_mobile.o] Error 1 make[1]: Leaving directory/kituri/voip/asterisk-1.4/add-on svn/trunk’
make: *** [all] Error 2
root@core:/kituri/voip/asterisk-1.4/add-on svn/trunk#

did U put a # in front of it… if U did… thats not a comment in c …

/sdp session = sdp register();/

make the line look like above… if U did that, I dont have a clue why it failed.

Thanks for the info…first time used “#” :smile:
Compiled with succes.

First, thank you for this interesting product. I will try it with all avaible bluetooth phone & send info for succes or debug on failure.

Start testing with Nokia E60. (europe.nokia.com/A4142097)
Outgoing & Incoming with no audio.
Please tell me if you need debug info from hcid or other source.


core*CLI> mobile show devices
ID Address Connected State SMS
E60 (censored) Yes Free No

Outgoing call

core*CLI>
– Executing [censored@payphone:1] Dial(“SIP/1001-0822bf60”, “Mobile/E60/censored|45”) in new stack
– Called E60/censored
– Mobile/E60-f821 is ringing
– Mobile/E60-f821 answered SIP/1001-0822bf60

Incomming call

core*CLI>
– Executing [s@gsm:1] Dial(“Mobile/E60-9d2a”, “SIP/1001|45”) in new stack
– Called 1001
– SIP/1001-0825e1f0 is ringing
– Call on SIP/1001-0825e1f0 left from hold
– SIP/1001-0825e1f0 answered Mobile/E60-9d2a

Try to send this thing some touchtones thru the disa… Im having lots of problems with consistant touchtone decoding… Ive tried using debug and making sure the dtmf is not bouncing. (showing double digits).

Otherwise, this module appears to work as advertised. If I can just get the dtmf decoding consistant… then this will be OUTSTANDING!!!

thanks

DISA ?
I have no sound uplink/downlink… what is the use to test DTMF tone when the basic (voice) of the phone is not working ?

Patch for not coredump

— chan_mobile.c (revision 412)
+++ chan_mobile.c (working copy)
@@ -1065,7 +1065,12 @@
sdp_set_info_attr(record, service_name, service_prov, service_dsc);

    session = sdp_connect(BDADDR_ANY, BDADDR_LOCAL, SDP_RETRY_IF_BUSY);
  •   err = sdp_record_register(session, record, 0);
    
  •    if (session==NULL)   /* Patch galmague 20070715*/
    
  •    {
    
  •        ast_log(LOG_ERROR, "Unable open sdp (check kernel modules l2cap and hcid )");
    
  •    }
    
  •    else
    
  •       err = sdp_record_register(session, record, 0);
    
      sdp_data_free(channel);
      sdp_list_free(rfcomm_list, 0);