Hi folks,
I installed asterisk from trunk (rev 169720) and addons from trunk (rev 732) on a CentOS server:
Linux XXXXXX 2.6.9-78.ELsmp #1 SMP Fri Jul 25 00:04:28 EDT 2008 i686 i686 i386 GNU/Linux
and bluez 2.10-3 and use bluetooth dongle (Integrated System Solution Corp. KY-BT100 Bluetooth Adapter) and the cellphone is a NOKIA 5310
It works very well.
Now I’m trying to reproduce this setup in a embedded system (ARM)
I installed asterisk 1.6.1.0, asterisk addons 1.6.1.0, bluez 4.32 and the OS is a Ubuntu 9.05:
Linux XXXXXX 2.6.22.18 #1 Thu Mar 19 14:46:22 IST 2009 armv5tejl GNU/Linux
Everything works perfect accept the audio. I can hear no sound on both directions.
I enabled the asterisk logs and saw that the mbl_write/read functions are not called (chan_mobile.c). Here is the output:
[May 19 17:41:33] VERBOSE[12276] asterisk.c: -- Remote UNIX connection
[May 19 17:41:46] DEBUG[12294] chan_mobile.c: connect() failed (111).
[May 19 17:42:15] DEBUG[12303] chan_sip.c: Allocating new SIP dialog for 579ad3c451701c9408695e2b102caf16@192.168.0.121 - OPTIONS (No RTP)
[May 19 17:42:15] DEBUG[12303] chan_sip.c: Initializing initreq for method OPTIONS - callid 60528ba72534acb52a49bb9f0fac94b7@192.168.0.121
[May 19 17:42:15] DEBUG[12303] chan_sip.c: Trying to put 'OPTIONS si' onto UDP socket destined for 192.168.0.61:35240
[May 19 17:42:15] DEBUG[12303] chan_sip.c: Stopping retransmission on '60528ba72534acb52a49bb9f0fac94b7@192.168.0.121' of Request 102: Match Found
[May 19 17:42:21] VERBOSE[12294] chan_mobile.c: -- Bluetooth Device Seste has connected.
[May 19 17:42:21] DEBUG[12317] chan_mobile.c: rfcomm_write() (Seste) [AT+BRSF=4]
[May 19 17:42:21] DEBUG[12318] chan_mobile.c: About to accept() socket.
[May 19 17:42:21] DEBUG[12317] chan_mobile.c: rfcomm_read() (Seste) [+BRSF: 495]
[May 19 17:42:21] DEBUG[12317] chan_mobile.c: rfcomm_read() (Seste) [OK]
[May 19 17:42:21] DEBUG[12317] chan_mobile.c: rfcomm_write() (Seste) [AT+CIND=?]
[May 19 17:42:22] DEBUG[12317] chan_mobile.c: rfcomm_read() (Seste) [+CIND: ("call",(0,1)),("service",(0,1)),("call_setup",(0-3)),("callsetup",(0-3)),("callheld",(0-2)),("battchg",(0-5)),("roam",(0,1)),("signal",(0-5))]
[May 19 17:42:22] DEBUG[12317] chan_mobile.c: CIEV_CALL=1 CIEV_CALLSETUP=4
[May 19 17:42:22] DEBUG[12317] chan_mobile.c: rfcomm_read() (Seste) [OK]
[May 19 17:42:22] DEBUG[12317] chan_mobile.c: rfcomm_write() (Seste) [AT+CIND?]
[May 19 17:42:22] DEBUG[12317] chan_mobile.c: rfcomm_read() (Seste) [+CIND: 0,1,0,0,0,1,0,5]
[May 19 17:42:22] DEBUG[12317] chan_mobile.c: rfcomm_read() (Seste) [OK]
[May 19 17:42:22] DEBUG[12317] chan_mobile.c: rfcomm_write() (Seste) [AT+CMER=3,0,0,1]
[May 19 17:42:22] DEBUG[12317] chan_mobile.c: rfcomm_read() (Seste) [OK]
[May 19 17:42:22] DEBUG[12317] chan_mobile.c: rfcomm_write() (Seste) [AT+CLIP=1]
[May 19 17:42:22] DEBUG[12317] chan_mobile.c: rfcomm_read() (Seste) [OK]
[May 19 17:42:22] DEBUG[12317] chan_mobile.c: rfcomm_write() (Seste) [AT+VGS=15]
[May 19 17:42:22] DEBUG[12317] chan_mobile.c: rfcomm_read() (Seste) [OK]
[May 19 17:42:22] DEBUG[12317] chan_mobile.c: rfcomm_write() (Seste) [AT+CMGF=1]
[May 19 17:42:22] DEBUG[12317] chan_mobile.c: rfcomm_read() (Seste) [OK]
[May 19 17:42:22] DEBUG[12317] chan_mobile.c: rfcomm_write() (Seste) [AT+CNMI=2,1,0,1,0]
[May 19 17:42:22] DEBUG[12317] chan_mobile.c: rfcomm_read() (Seste) [ERROR]
[May 19 17:42:23] VERBOSE[12317] chan_mobile.c: -- Bluetooth Device Seste initialised and ready.
[May 19 17:42:30] DEBUG[12303] chan_sip.c: Allocating new SIP dialog for ZDBkZWNjN2E4NjllMzA2YzlhOWU0MTBmOTQxZDYyZTM. - SUBSCRIBE (No RTP)
[May 19 17:42:30] DEBUG[12303] chan_sip.c: Trying to put 'SIP/2.0 48' onto UDP socket destined for 192.168.0.61:35240
[May 19 17:42:35] DEBUG[12303] chan_sip.c: Allocating new SIP dialog for MDQ1OTEwOGU3NjI1MTVhYTA2ODNhODAxMmZiYmRiMDE. - SUBSCRIBE (No RTP)
[May 19 17:42:35] DEBUG[12303] chan_sip.c: Trying to put 'SIP/2.0 40' onto UDP socket destined for 192.168.0.61:35240
[May 19 17:42:35] DEBUG[12303] chan_sip.c: Trying to put 'SIP/2.0 20' onto UDP socket destined for 192.168.0.61:35240
[May 19 17:42:35] DEBUG[12303] chan_sip.c: Trying to put 'NOTIFY sip' onto UDP socket destined for 192.168.0.61:35240
[May 19 17:42:36] DEBUG[12303] chan_sip.c: Stopping retransmission on 'MDQ1OTEwOGU3NjI1MTVhYTA2ODNhODAxMmZiYmRiMDE.' of Request 102: Match Found
[May 19 17:43:16] DEBUG[12303] chan_sip.c: Allocating new SIP dialog for 5077205d448e35ca6baeb1220086f269@192.168.0.121 - OPTIONS (No RTP)
[May 19 17:43:16] DEBUG[12303] chan_sip.c: Initializing initreq for method OPTIONS - callid 48f0a8d56e1ceb0a135d77ae3435a9f5@192.168.0.121
[May 19 17:43:16] DEBUG[12303] chan_sip.c: Trying to put 'OPTIONS si' onto UDP socket destined for 192.168.0.61:35240
[May 19 17:43:16] DEBUG[12303] chan_sip.c: Stopping retransmission on '48f0a8d56e1ceb0a135d77ae3435a9f5@192.168.0.121' of Request 102: Match Found
[May 19 17:43:32] DEBUG[12317] chan_mobile.c: rfcomm_read() (Seste) [+CIEV: 3,1]
[May 19 17:43:32] DEBUG[12317] chan_mobile.c: Device Seste [+CIEV: 3,1]
[May 19 17:43:32] DEBUG[12317] chan_mobile.c: rfcomm_read() (Seste) [+CIEV: 4,1]
[May 19 17:43:32] DEBUG[12317] chan_mobile.c: Device Seste [+CIEV: 4,1]
[May 19 17:43:33] DEBUG[12317] chan_mobile.c: rfcomm_read() (Seste) [RING]
[May 19 17:43:33] DEBUG[12317] chan_mobile.c: Device Seste [RING]
[May 19 17:43:33] DEBUG[12317] chan_mobile.c: rfcomm_read() (Seste) [+CLIP: "01937079590",161]
[May 19 17:43:33] DEBUG[12322] pbx.c: Launching 'Set'
[May 19 17:43:33] VERBOSE[12322] pbx.c: -- Executing [s@incoming-mobile:1] Set("Mobile/Seste-43c2", "CHANNEL(language)=br") in new stack
[May 19 17:43:33] DEBUG[12322] pbx.c: Launching 'Set'
[May 19 17:43:33] VERBOSE[12322] pbx.c: -- Executing [s@incoming-mobile:2] Set("Mobile/Seste-43c2", "CALLERID(name)=unknown") in new stack
[May 19 17:43:33] DEBUG[12322] pbx.c: Launching 'Dial'
[May 19 17:43:33] VERBOSE[12322] pbx.c: -- Executing [s@incoming-mobile:3] Dial("Mobile/Seste-43c2", "SIP/1000&SIP/2000,30") in new stack
[May 19 17:43:33] DEBUG[12322] chan_sip.c: Asked to create a SIP channel with formats: 0x40 (slin)
[May 19 17:43:33] VERBOSE[12322] netsock.c: == Using SIP RTP CoS mark 5
[May 19 17:43:33] DEBUG[12322] chan_sip.c: Allocating new SIP dialog for 490721bf71088ec33a955b664efbda99@192.168.0.121 - INVITE (With RTP)
[May 19 17:43:33] DEBUG[12322] chan_sip.c: Setting NAT on RTP to Off
[May 19 17:43:33] WARNING[12322] chan_sip.c: No such host: 1000
[May 19 17:43:33] WARNING[12322] app_dial.c: Unable to create channel of type 'SIP' (cause 20 - Unknown)
[May 19 17:43:33] DEBUG[12322] chan_sip.c: Asked to create a SIP channel with formats: 0x40 (slin)
[May 19 17:43:33] VERBOSE[12322] netsock.c: == Using SIP RTP CoS mark 5
[May 19 17:43:33] DEBUG[12322] chan_sip.c: Allocating new SIP dialog for 661b5a5911754f4d4fa04e5f04b0f9e1@192.168.0.121 - INVITE (With RTP)
[May 19 17:43:33] DEBUG[12322] chan_sip.c: Setting NAT on RTP to Off
[May 19 17:43:33] DEBUG[12322] rtp.c: Channel 'Mobile/Seste-43c2' has no RTP, not doing anything
[May 19 17:43:33] DEBUG[12322] channel.c: Not copying variable DIALEDTIME.
[May 19 17:43:33] DEBUG[12322] channel.c: Not copying variable ANSWEREDTIME.
[May 19 17:43:33] DEBUG[12322] channel.c: Not copying variable DIALEDPEERNAME.
[May 19 17:43:33] DEBUG[12322] channel.c: Not copying variable DIALEDPEERNUMBER.
[May 19 17:43:33] DEBUG[12322] channel.c: Not copying variable DIALSTATUS.
[May 19 17:43:33] DEBUG[12322] chan_sip.c: Outgoing Call for 2000
[May 19 17:43:33] DEBUG[12322] chan_sip.c: ** Our capability: 0xe (gsm|ulaw|alaw) Video flag: False Text flag: False
[May 19 17:43:33] DEBUG[12322] chan_sip.c: ** Our prefcodec: 0x40 (slin)
[May 19 17:43:33] DEBUG[12322] chan_sip.c: Initializing initreq for method INVITE - callid 1e8eac432d52cf8a66388f5f2c1e4382@192.168.0.121
[May 19 17:43:33] DEBUG[12322] chan_sip.c: Trying to put 'INVITE sip' onto UDP socket destined for 192.168.0.61:35240
[May 19 17:43:33] VERBOSE[12322] app_dial.c: -- Called 2000
[May 19 17:43:33] DEBUG[12303] chan_sip.c: (Provisional) Stopping retransmission (but retaining packet) on '1e8eac432d52cf8a66388f5f2c1e4382@192.168.0.121' Request 102: Found
[May 19 17:43:33] VERBOSE[12322] app_dial.c: -- SIP/2000-00208840 is ringing
[May 19 17:43:33] DEBUG[12322] channel.c: Driver for channel 'Mobile/Seste-43c2' does not support indication 3, emulating it
[May 19 17:43:33] DEBUG[12322] channel.c: Prodding channel 'Mobile/Seste-43c2'
[May 19 17:43:33] DEBUG[12322] channel.c: Scheduling timer at (50 requested / 50 actual) timer ticks per second
[May 19 17:43:37] DEBUG[12317] chan_mobile.c: rfcomm_read() (Seste) [RING]
[May 19 17:43:37] DEBUG[12317] chan_mobile.c: rfcomm_read() (Seste) [+CLIP: "01937079590",161]
[May 19 17:43:42] DEBUG[12322] rtp.c: Got RTCP report of 132 bytes
[May 19 17:43:42] DEBUG[12322] chan_sip.c: Oooh, format changed to 4 ulaw
[May 19 17:43:42] DEBUG[12322] channel.c: Set channel SIP/2000-00208840 to read format slin
[May 19 17:43:42] DEBUG[12322] channel.c: Set channel SIP/2000-00208840 to write format slin
[May 19 17:43:42] DEBUG[12303] chan_sip.c: Acked pending invite 102
[May 19 17:43:42] DEBUG[12303] chan_sip.c: Stopping retransmission on '1e8eac432d52cf8a66388f5f2c1e4382@192.168.0.121' of Request 102: Match Found
[May 19 17:43:42] DEBUG[12303] chan_sip.c: Trying to put 'ACK sip:20' onto UDP socket destined for 192.168.0.61:35240
[May 19 17:43:42] DEBUG[12303] chan_sip.c: Trying to put 'SIP/2.0 50' onto UDP socket destined for 192.168.0.61:35240
[May 19 17:43:42] DEBUG[12303] chan_sip.c: Invalid SIP message - rejected , no callid, len 1028
[May 19 17:43:42] VERBOSE[12322] app_dial.c: -- SIP/2000-00208840 answered Mobile/Seste-43c2
[May 19 17:43:42] DEBUG[12322] channel.c: Scheduling timer at (0 requested / 0 actual) timer ticks per second
[May 19 17:43:42] DEBUG[12322] chan_mobile.c: rfcomm_write() (Seste) [ATA]
[May 19 17:43:42] DEBUG[12278] chan_mobile.c: Checking device state for device Seste
[May 19 17:43:42] DEBUG[12317] chan_mobile.c: rfcomm_read() (Seste) [OK]
[May 19 17:43:42] DEBUG[12317] chan_mobile.c: rfcomm_read() (Seste) [+CIEV: 1,1]
[May 19 17:43:42] DEBUG[12317] chan_mobile.c: rfcomm_read() (Seste) [+CIEV: 3,0]
[May 19 17:43:42] DEBUG[12317] chan_mobile.c: rfcomm_read() (Seste) [+CIEV: 4,0]
[May 19 17:43:42] DEBUG[12318] chan_mobile.c: accept()ed socket.
[May 19 17:43:42] DEBUG[12318] chan_mobile.c: Incoming Audio Connection from device 00:1D:FD:E4:42:FF MTU is 64
[May 19 17:43:42] DEBUG[12318] chan_mobile.c: About to accept() socket.
[May 19 17:43:52] DEBUG[12317] chan_mobile.c: rfcomm_read() (Seste) [+CIEV: 8,4]
[May 19 17:44:01] DEBUG[12317] chan_mobile.c: rfcomm_read() (Seste) [+CIEV: 8,5]
[May 19 17:44:16] DEBUG[12303] chan_sip.c: Allocating new SIP dialog for 79ecbf0b7e04d89803d580d1518761df@192.168.0.121 - OPTIONS (No RTP)
[May 19 17:44:16] DEBUG[12303] chan_sip.c: Initializing initreq for method OPTIONS - callid 44aeb4be06cdcae05f0f758f7acfea90@192.168.0.121
[May 19 17:44:16] DEBUG[12303] chan_sip.c: Trying to put 'OPTIONS si' onto UDP socket destined for 192.168.0.61:35240
[May 19 17:44:16] DEBUG[12303] chan_sip.c: Stopping retransmission on '44aeb4be06cdcae05f0f758f7acfea90@192.168.0.121' of Request 102: Match Found
[May 19 17:44:17] DEBUG[12317] chan_mobile.c: rfcomm_read() (Seste) [+CIEV: 8,4]
[May 19 17:44:28] DEBUG[12317] chan_mobile.c: rfcomm_read() (Seste) [NO CARRIER]
[May 19 17:44:28] DEBUG[12317] chan_mobile.c: rfcomm_read() (Seste) [+CIEV: 1,0]
[May 19 17:44:33] DEBUG[12317] chan_mobile.c: rfcomm_read() (Seste) [+CIEV: 8,5]
[May 19 17:44:33] DEBUG[12303] chan_sip.c: Trying to put 'SIP/2.0 20' onto UDP socket destined for 192.168.0.61:35240
[May 19 17:44:33] DEBUG[12303] chan_sip.c: Trying to put 'SIP/2.0 50' onto UDP socket destined for 192.168.0.61:35240
[May 19 17:44:33] DEBUG[12303] chan_sip.c: Invalid SIP message - rejected , no callid, len 992
[May 19 17:44:33] DEBUG[12303] chan_sip.c: Trying to put 'SIP/2.0 20' onto UDP socket destined for 192.168.0.61:35240
[May 19 17:44:33] DEBUG[12303] chan_sip.c: Trying to put 'SIP/2.0 50' onto UDP socket destined for 192.168.0.61:35240
[May 19 17:44:33] DEBUG[12303] chan_sip.c: Invalid SIP message - rejected , no callid, len 992
[May 19 17:44:33] DEBUG[12303] chan_sip.c: Trying to put 'SIP/2.0 20' onto UDP socket destined for 192.168.0.61:35240
[May 19 17:44:33] DEBUG[12303] chan_sip.c: Trying to put 'SIP/2.0 50' onto UDP socket destined for 192.168.0.61:35240
[May 19 17:44:33] DEBUG[12303] chan_sip.c: Invalid SIP message - rejected , no callid, len 992
[May 19 17:44:33] DEBUG[12303] chan_sip.c: Trying to put 'SIP/2.0 20' onto UDP socket destined for 192.168.0.61:35240
[May 19 17:44:33] DEBUG[12303] chan_sip.c: Trying to put 'SIP/2.0 50' onto UDP socket destined for 192.168.0.61:35240
[May 19 17:44:33] DEBUG[12303] chan_sip.c: Invalid SIP message - rejected , no callid, len 992
[May 19 17:44:33] DEBUG[12322] channel.c: Didn't get a frame from channel: SIP/2000-00208840
[May 19 17:44:33] DEBUG[12322] channel.c: Bridge stops bridging channels Mobile/Seste-43c2 and SIP/2000-00208840
[May 19 17:44:33] DEBUG[12322] channel.c: Hanging up channel 'SIP/2000-00208840'
[May 19 17:44:33] DEBUG[12322] chan_sip.c: Hangup call SIP/2000-00208840, SIP callid 1e8eac432d52cf8a66388f5f2c1e4382@192.168.0.121
[May 19 17:44:33] DEBUG[12322] app_dial.c: Exiting with DIALSTATUS=ANSWER.
[May 19 17:44:33] DEBUG[12322] pbx.c: Spawn extension (incoming-mobile,s,3) exited non-zero on 'Mobile/Seste-43c2'
[May 19 17:44:33] VERBOSE[12322] pbx.c: == Spawn extension (incoming-mobile, s, 3) exited non-zero on 'Mobile/Seste-43c2'
[May 19 17:44:33] DEBUG[12322] channel.c: Soft-Hanging up channel 'Mobile/Seste-43c2'
[May 19 17:44:33] DEBUG[12322] channel.c: Hanging up channel 'Mobile/Seste-43c2'
[May 19 17:44:33] DEBUG[12322] chan_mobile.c: Hanging up device Seste.
[May 19 17:44:33] DEBUG[12278] chan_mobile.c: Checking device state for device Seste
[May 19 17:44:33] DEBUG[12278] chan_mobile.c: Checking device state for device Seste
[May 19 17:45:16] DEBUG[12303] chan_sip.c: Allocating new SIP dialog for 0038ba4a1f9d6d875010e44e3eb07ddd@192.168.0.121 - OPTIONS (No RTP)
[May 19 17:45:16] DEBUG[12303] chan_sip.c: Initializing initreq for method OPTIONS - callid 2f310a92212bb7a54ae80f1b6fc0cf27@192.168.0.121
[May 19 17:45:16] DEBUG[12303] chan_sip.c: Trying to put 'OPTIONS si' onto UDP socket destined for 192.168.0.61:35240
[May 19 17:45:16] DEBUG[12303] chan_sip.c: Stopping retransmission on '2f310a92212bb7a54ae80f1b6fc0cf27@192.168.0.121' of Request 102: Match Found
[May 19 17:46:16] DEBUG[12303] chan_sip.c: Allocating new SIP dialog for 75547e4f219114db486f54800e333068@192.168.0.121 - OPTIONS (No RTP)
[May 19 17:46:16] DEBUG[12303] chan_sip.c: Initializing initreq for method OPTIONS - callid 1868d9ae2c7ea9872b40330f1af93a12@192.168.0.121
[May 19 17:46:16] DEBUG[12303] chan_sip.c: Trying to put 'OPTIONS si' onto UDP socket destined for 192.168.0.61:35240
[May 19 17:46:16] DEBUG[12303] chan_sip.c: Stopping retransmission on '1868d9ae2c7ea9872b40330f1af93a12@192.168.0.121' of Request 102: Match Found
I made a dump of the bluetooth package using hcidump:
root@debian:/etc/bluetooth# hcidump
HCI sniffer - Bluetooth packet analyzer ver 1.42
device: hci0 snap_len: 1028 filter: 0xffffffff
< ACL data: handle 42 flags 0x02 dlen 25
L2CAP(d): cid 0x0040 len 21 [psm 0]
> HCI Event: Number of Completed Packets (0x13) plen 5
> ACL data: handle 42 flags 0x02 dlen 15
L2CAP(d): cid 0x0040 len 11 [psm 0]
> ACL data: handle 42 flags 0x02 dlen 36
L2CAP(d): cid 0x0040 len 32 [psm 0]
> HCI Event: Encrypt Change (0x08) plen 4
> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
> HCI Event: Role Change (0x12) plen 8
> HCI Event: Max Slots Change (0x1b) plen 3
> HCI Event: Encrypt Change (0x08) plen 4
> ACL data: handle 42 flags 0x02 dlen 36
L2CAP(d): cid 0x0040 len 32 [psm 0]
> HCI Event: Connect Request (0x04) plen 10
< HCI Command: Accept Synchronous Connection (0x01|0x0029) plen 21
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: Synchronous Connect Complete (0x2c) plen 17
< SCO data: handle 46 flags 0x00 dlen 48
> ACL data: handle 42 flags 0x02 dlen 22
L2CAP(d): cid 0x0040 len 18 [psm 0]
> ACL data: handle 42 flags 0x02 dlen 22
L2CAP(d): cid 0x0040 len 18 [psm 0]
> ACL data: handle 42 flags 0x02 dlen 22
L2CAP(d): cid 0x0040 len 18 [psm 0]
> ACL data: handle 42 flags 0x02 dlen 22
L2CAP(d): cid 0x0040 len 18 [psm 0]
> ACL data: handle 42 flags 0x02 dlen 36
L2CAP(d): cid 0x0040 len 32 [psm 0]
> ACL data: handle 42 flags 0x02 dlen 22
L2CAP(d): cid 0x0040 len 18 [psm 0]
> ACL data: handle 42 flags 0x02 dlen 22
L2CAP(d): cid 0x0040 len 18 [psm 0]
> ACL data: handle 42 flags 0x02 dlen 22
L2CAP(d): cid 0x0040 len 18 [psm 0]
> HCI Event: Disconn Complete (0x05) plen 4
Anybody knows what is happening??
tks
Rafael Seste