Miax: Mobile Inter Asterisk eXchange Client

またまた2ヶ月ほど前に書きかけでうっちゃってた記事。完成させることはなさそうだからこのまま公開。


Miax: Mobile Inter Asterisk eXchange Clientが思うように動かず目的を達成できなかった。ソースを読めば、モデムのコントロールは呼の呼びや終了しかやっておらず、メディア・データは全く扱ってないので、思うような結果が得られるはずがなかった。

conf.d/regfile.confで以下のように設定

[100]
password=

[200]
password=

あくまでテストなのでパスワードは設定してない。

PC上で走らせたYateに、USB 3Gドングルを挿したOpenWrtルータ上で走るMiaxと、一般SIPクライアントをレジストさせ、3Gドングル宛の呼をSIPクライアントにルートすることまではできた。が、メディアデータ(音声)が扱えなければ全く意味がない。

conf.d/regexroute.confで以下のように設定

^090XXXXXXXX$=return;called=200

090XXXXXXXXは使用SIMカードに対応する回線番号。

ただし、ソースをパラパラ眺める限り、これはBluetooth接続した端末も扱えるようで、このケースについてはメディアデータも扱うようだ。なのでBluetooth機能を持つ端末が利用できればそれとは併用できるかもしれない。ただし、そのためにはOpenWrtルータ側でUSB Bluetoothアダプタが使えるようにしなくてはならず、それはそれで手間かもしれない。

父の古いガラケーシャープ製ソフトバンク911SH別のサイト)にはBluetooth機能があり、さらに元々はソフトバンク740SC用に用意したSIM下駄でSIMロック解除ができる

USB Bluetooth support – OpenWrt Wiki

Bluetooth Bluez

OpenWrtのBTドングル側のパスコードは/etc/bluetooth/hcid.confで設定

‘bluetooth’ must be in the form source/destination/channel, i.e. ss:ss:ss:ss:ss:ss/dd:dd:dd:dd:dd:dd/nn

ということなので以下のようにやってみた。

#  miax -u 100 -p 001 -s 192.168.11.63 -r -b "99:88:66:00:22:67/00:17:5C:5A:63:5C/2" -g

Gentoo Linux ドキュメント — Gentoo Linux Bluetoothガイド

上では仮に2としたが、チャンネルというのがよくわからない。sdptool
root@OpenWrt:~# sdptool browse
Inquiring …
Browsing 00:17:5C:5A:63:5C …
Service Description: 911SH
Service RecHandle: 0x10000
Service Class ID List:
“PnP Information” (0x1200)

Service Name: OBEX Object Push
Service RecHandle: 0x10001
Service Class ID List:
“OBEX Object Push” (0x1105)
Protocol Descriptor List:
“L2CAP” (0x0100)
“RFCOMM” (0x0003)
Channel: 1
“OBEX” (0x0008)
Profile Descriptor List:
“OBEX Object Push” (0x1105)
Version: 0x0100

Service Name: Dial-up Networking
Service RecHandle: 0x10002
Service Class ID List:
“Dialup Networking” (0x1103)
“Generic Networking” (0x1201)
Protocol Descriptor List:
“L2CAP” (0x0100)
“RFCOMM” (0x0003)
Channel: 2
Profile Descriptor List:
“Dialup Networking” (0x1103)
Version: 0x0100

Service Name: HS Voice Gateway
Service RecHandle: 0x10004
Service Class ID List:
“Headset Audio Gateway” (0x1112)
“Generic Audio” (0x1203)
Protocol Descriptor List:
“L2CAP” (0x0100)
“RFCOMM” (0x0003)
Channel: 4
Profile Descriptor List:
“Headset” (0x1108)
Version: 0x0100

Service Name: HF Voice Gateway
Service RecHandle: 0x10005
Service Class ID List:
“Handsfree Audio Gateway” (0x111f)
“Generic Audio” (0x1203)
Protocol Descriptor List:
“L2CAP” (0x0100)
“RFCOMM” (0x0003)
Channel: 5
Profile Descriptor List:
“Handsfree” (0x111e)
Version: 0x0101

Service Name: OBEX File Transfer
Service RecHandle: 0x10006
Service Class ID List:
“OBEX File Transfer” (0x1106)
Protocol Descriptor List:
“L2CAP” (0x0100)
“RFCOMM” (0x0003)
Channel: 6
“OBEX” (0x0008)
Profile Descriptor List:
“OBEX File Transfer” (0x1106)
Version: 0x0100

Differences Between a Hands-Free & Headset Profile | Chron.com“を見るとここで使いたいのはHandsfreepプロファイルのように思えるので5を指定するのが妥当のように思える。しかし、2, 4, 5で試した範囲では2を指定したときのみSIPクライアントへの転送が成功する。もっとも、そこで呼びを受けても相変わらず発信側は呼び出し中の状態であるし、受ける側の端末も呼び出し音が鳴り続ける。一回だけつながったとおもわれることがあったがどういう条件だったかわからない。

…と思ったが、考えてみたら、OpenWrtから見ると、ガラケー端末のほうが周辺機器扱いなわけで、そうすると2のDUNが妥当のようにも思える。

Miaxのログ

BT modem ready.
Miax: ready.
Miax: Registration accepted
Miax: Call 0 ringing
Can't connect SCO audio channel: Connection refused
Miax: Call 0 answered
Can't connect SCO audio channel: Connection refused
Can't connect SCO audio channel: Connection refused
Can't connect SCO audio channel: Connection refused
Can't connect SCO audio channel: Connection refused
Can't connect SCO audio channel: Connection refused
Can't connect SCO audio channel: Connection refused
Can't connect SCO audio channel: Connection refused
Can't connect SCO audio channel: Connection refused
Can't connect SCO audio channel: Connection refused
Can't connect SCO audio channel: Connection refused
Can't connect SCO audio channel: Connection refused
Can't connect SCO audio channel: Connection refused
Can't connect SCO audio channel: Connection refused
Can't connect SCO audio channel: Operation now in progress
Can't connect SCO audio channel: Connection refused
Can't connect SCO audio channel: Address already in use
Can't connect SCO audio channel: Address already in use
Can't connect SCO audio channel: Address already in use
refreshing registration 100:001@192.168.11.63
Miax: Call disconnected by remote
Miax: bye! :)

List of Bluetooth protocols – Wikipedia, the free encyclopedia

 Received frame [01E3C568]
-----
IAX (0x06) - NEW (0x00000001)
  Incoming from 192.168.11.170:4569 (Local address: 0.0.0.0:4569)
  Call (Local:Remote): 0:13821. Timestamp: 3. Retrans: false. Sequence numbers: Out: 0 In: 0
  VERSION: 0x0002
  CALLING_NUMBER: 352
  CALLING_NAME: miax
  FORMAT: 0x00000002 (GSM)
  CAPABILITY: 0x00000002 (GSM)
  USERNAME: 100
  CALLED_NUMBER: 090XXXXXXXX
  DNID: 090XXXXXXXX
-----
 Transaction incoming call=1325 type=New remote=192.168.11.170:4569 [068E3D60]
 Sending frame [01E3C568]
-----
IAX (0x06) - ACK (0x00000004)
  Outgoing to 192.168.11.170:4569 (Local address: 0.0.0.0:4569)
  Call (Local:Remote): 1325:13821. Timestamp: 3. Retrans: false. Sequence numbers: Out: 0 In: 1
  No Information Element(s)
-----
 Transaction(1325,13821) state changed Unknown --> NewRemoteInvite [068E3D60]
 Transaction(1325,13821) removing incoming Frame(6,1) iseq=0 oseq=0 stamp=3 [068E3D60]
 Incoming call. Transaction (068E3D60) callno=1325 [068E5468]
 Transaction(1325,13821) set format 2 (GSM) for media 'audio' [068E3D60]
 Could not classify call from '352', wasted 0 usec
 Got message 'call.route' for untracked id 'iax/1'
 Could not route call to '090XXXXXXXX' in context 'default', wasted 0 usec
 Routed '200' via 'sip/sip:76059432@192.168.11.63:55332(null)'
 YateSIPConnection::YateSIPConnection(01E32030,'sip:76059432@192.168.11.63:55332') [068E63C0]
 YateSIPPartyHolder transport id changed to 'general' [068E65EC]
 YateSIPPartyHolder remote addr changed to '192.168.11.63:55332' [068E65EC]
 NAT address is '(null)' [068E63C0]
 Set media: audio=gsm [068E63C0]
 RTP/AVP message received
 Guessed local IP '192.168.11.63' for remote '192.168.11.63'
 YRTPWrapper::YRTPWrapper('192.168.11.63',068E63C0,'audio',bidir,01E32150,false) [068E7238]
 YRTPWrapper::setupRTP("192.168.11.63",true,true) [068E7238]
 Session 'yrtp/1257377061' 01E23BA8 bound to 192.168.11.63:21944 +RTCP [068E7238]
 YRTPSource::YRTPSource(068E7238) [01E591E8]
 YRTPConsumer::YRTPConsumer(068E7238) [01E23C18]
 YRTPWrapper::setupSRTP(false) [068E7238]
 Transaction(1325,13821) set format 2 (GSM) for media 'audio' [068E3D60]
 Transaction(1325,13821) posting Frame(6,7) oseq=0 iseq=1 stamp=8 [068E3D60]
 Sending frame [01E3C568]
-----
IAX (0x06) - ACCEPT (0x00000007)
  Outgoing to 192.168.11.170:4569 (Local address: 0.0.0.0:4569)
  Call (Local:Remote): 1325:13821. Timestamp: 8. Retrans: false. Sequence numbers: Out: 0 In: 1
  FORMAT: 0x00000002 (GSM)
  CAPABILITY: 0x00000002 (GSM)
-----
 Transaction(1325,13821) state changed NewRemoteInvite --> Connected [068E3D60]
 'udp:0.0.0.0:5060' sending 'INVITE sip:76059432@192.168.11.63:55332' 01E4C9E0 to 192.168.11.63:55332 [01E54408]
------
INVITE sip:76059432@192.168.11.63:55332 SIP/2.0
Max-Forwards: 20
Via: SIP/2.0/UDP 192.168.11.63:5060;rport;branch=z9hG4bK138920445
From: "miax" ;tag=694010358
To: 
Call-ID: 1854940628@192.168.11.63
CSeq: 1 INVITE
User-Agent: YATE/5.4.0
Contact: 
Allow: ACK, INVITE, BYE, CANCEL, REGISTER, REFER, OPTIONS, INFO
Content-Type: application/sdp
Content-Length: 184

v=0
o=yate 1407845129 1407845129 IN IP4 192.168.11.63
s=SIP Call
c=IN IP4 192.168.11.63
t=0 0
m=audio 21944 RTP/AVP 3 101
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
------
 'udp:0.0.0.0:5060' received 307 bytes SIP message from 192.168.11.63:55332 [01E54408]
------
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.11.63:5060;rport=5060;received=192.168.11.63;branch=z9hG4bK138920445
Call-ID: 1854940628@192.168.11.63
From: "miax" ;tag=694010358
To: 
CSeq: 1 INVITE
Server: Blink 0.9.1.2 (Windows)
Content-Length:  0

------
 Received frame [01E3C568]
-----
IAX (0x06) - ACK (0x00000004)
  Incoming from 192.168.11.170:4569 (Local address: 0.0.0.0:4569)
  Call (Local:Remote): 1325:13821. Timestamp: 8. Retrans: false. Sequence numbers: Out: 1 In: 1
  No Information Element(s)
-----
 Transaction(1325,13821) enqueued Frame(6,4) iseq=1 oseq=1 stamp=8 [068E3D60]
 'udp:0.0.0.0:5060' received 473 bytes SIP message from 192.168.11.63:55332 [01E54408]
------
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.11.63:5060;rport=5060;received=192.168.11.63;branch=z9hG4bK138920445
Call-ID: 1854940628@192.168.11.63
From: "miax" ;tag=694010358
To: ;tag=c8c1fe19dabb40ea9c31cbaaac9a4f2e
CSeq: 1 INVITE
Server: Blink 0.9.1.2 (Windows)
Contact: 
Allow: SUBSCRIBE, NOTIFY, PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE, REFER
Content-Length:  0

------
 Transaction(1325,13821) posting Frame(4,3) oseq=1 iseq=1 stamp=106 [068E3D60]
 Sending frame [01E3C568]
-----
CONTROL (0x04) - RINGING (0x00000003)
  Outgoing to 192.168.11.170:4569 (Local address: 0.0.0.0:4569)
  Call (Local:Remote): 1325:13821. Timestamp: 106. Retrans: false. Sequence numbers: Out: 1 In: 1
  No Information Element(s)
-----
 Starting outgoing media 'audio' format 'gsm' (2) [068E5468]
 YIAXConsumer 'audio' format=gsm [01E592D8]
 DataTranslator::attachChain [01E591E8] '(null)' -> [01E592D8] 'gsm' not possible
 Transaction(1325,13821) resending Frame(4,3) oseq=1 iseq=1 stamp=106 remaining=3 [068E3D60]
 Sending frame [01E3C568]
-----
CONTROL (0x04) - RINGING (0x00000003)
  Outgoing to 192.168.11.170:4569 (Local address: 0.0.0.0:4569)
  Call (Local:Remote): 1325:13821. Timestamp: 106. Retrans: true. Sequence numbers: Out: 1 In: 1
  No Information Element(s)
-----
 Received frame [01E3C568]
-----
IAX (0x06) - ACK (0x00000004)
  Incoming from 192.168.11.170:4569 (Local address: 0.0.0.0:4569)
  Call (Local:Remote): 1325:13821. Timestamp: 106. Retrans: false. Sequence numbers: Out: 1 In: 2
  No Information Element(s)
-----
 Transaction(1325,13821) enqueued Frame(6,4) iseq=2 oseq=1 stamp=106 [068E3D60]
 'udp:0.0.0.0:5060' received 788 bytes SIP message from 192.168.11.63:55332 [01E54408]
------
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.11.63:5060;rport=5060;received=192.168.11.63;branch=z9hG4bK138920445
Call-ID: 1854940628@192.168.11.63
From: "miax" ;tag=694010358
To: ;tag=c8c1fe19dabb40ea9c31cbaaac9a4f2e
CSeq: 1 INVITE
Server: Blink 0.9.1.2 (Windows)
Allow: SUBSCRIBE, NOTIFY, PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE, REFER
Contact: 
Supported: 100rel, replaces, norefersub, gruu
Content-Type: application/sdp
Content-Length:   239

v=0
o=- 3616866332 3616866333 IN IP4 192.168.11.63
s=Blink 0.9.1.2 (Windows)
t=0 0
m=audio 50024 RTP/AVP 3 101
c=IN IP4 192.168.11.63
a=rtcp:50025
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
------
 Set media: audio=gsm [068E63C0]
 RTP/AVP message received
 Wrapper 068E7238 found by CallEndpoint 068E63C0
 YRTPWrapper::startRTP("192.168.11.63",50024) [068E7238]
 RTP starting format 'gsm' payload 3 [068E7238]
>>> DataTranslator::detachChain(01E591E8,01E592D8)
<<< DataTranslator::detachChain
 'udp:0.0.0.0:5060' sending 'ACK sip:76059432@192.168.11.63:55332' 01E4C5E0 to 192.168.11.63:55332 [01E54408]
------
ACK sip:76059432@192.168.11.63:55332 SIP/2.0
Via: SIP/2.0/UDP 192.168.11.63:5060;rport;branch=z9hG4bK2136118434
From: "miax" ;tag=694010358
To: ;tag=c8c1fe19dabb40ea9c31cbaaac9a4f2e
Call-ID: 1854940628@192.168.11.63
CSeq: 1 ACK
Max-Forwards: 20
Contact: 
User-Agent: YATE/5.4.0
Content-Length: 0

------
 Transaction(1325,13821) posting Frame(4,4) oseq=2 iseq=1 stamp=3431 [068E3D60]
 Sending frame [01E3C568]
-----
CONTROL (0x04) - ANSWER (0x00000004)
  Outgoing to 192.168.11.170:4569 (Local address: 0.0.0.0:4569)
  Call (Local:Remote): 1325:13821. Timestamp: 3431. Retrans: false. Sequence numbers: Out: 2 In: 1
  No Information Element(s)
-----
 Starting incoming media 'audio' format 'gsm' (2) [068E5468]
 YIAXSource 'audio' format=gsm [068E1EB8]
 Transaction(1325,13821) started outgoing media 'audio' [068E3D60]
 Transaction(1325,13821) posting Frame(2,2) oseq=3 iseq=1 stamp=3437 [068E3D60]
 Sending frame [01E3C568]
-----
VOICE (0x02) - GSM (0x00000002)
  Outgoing to 192.168.11.170:4569 (Local address: 0.0.0.0:4569)
  Call (Local:Remote): 1325:13821. Timestamp: 3437. Retrans: false. Sequence numbers: Out: 3 In: 1
  No Information Element(s)
-----
 Transaction(1325,13821) resending Frame(4,4) oseq=2 iseq=1 stamp=3431 remaining=3 [068E3D60]
 Sending frame [01E3C568]
-----
CONTROL (0x04) - ANSWER (0x00000004)
  Outgoing to 192.168.11.170:4569 (Local address: 0.0.0.0:4569)
  Call (Local:Remote): 1325:13821. Timestamp: 3431. Retrans: true. Sequence numbers: Out: 2 In: 1
  No Information Element(s)
-----
 Transaction(1325,13821) resending Frame(2,2) oseq=3 iseq=1 stamp=3437 remaining=3 [068E3D60]
 Sending frame [01E3C568]
-----
VOICE (0x02) - GSM (0x00000002)
  Outgoing to 192.168.11.170:4569 (Local address: 0.0.0.0:4569)
  Call (Local:Remote): 1325:13821. Timestamp: 3437. Retrans: true. Sequence numbers: Out: 3 In: 1
  No Information Element(s)
-----
 Transaction(1325,13821) resending Frame(4,4) oseq=2 iseq=1 stamp=3431 remaining=2 [068E3D60]
 Sending frame [01E3C568]
-----
CONTROL (0x04) - ANSWER (0x00000004)
  Outgoing to 192.168.11.170:4569 (Local address: 0.0.0.0:4569)
  Call (Local:Remote): 1325:13821. Timestamp: 3431. Retrans: true. Sequence numbers: Out: 2 In: 1
  No Information Element(s)
-----
 Transaction(1325,13821) resending Frame(2,2) oseq=3 iseq=1 stamp=3437 remaining=2 [068E3D60]
 Sending frame [01E3C568]
-----
VOICE (0x02) - GSM (0x00000002)
  Outgoing to 192.168.11.170:4569 (Local address: 0.0.0.0:4569)
  Call (Local:Remote): 1325:13821. Timestamp: 3437. Retrans: true. Sequence numbers: Out: 3 In: 1
  No Information Element(s)
-----
 Transaction(1325,13821) resending Frame(4,4) oseq=2 iseq=1 stamp=3431 remaining=1 [068E3D60]
 Sending frame [01E3C568]
-----
CONTROL (0x04) - ANSWER (0x00000004)
  Outgoing to 192.168.11.170:4569 (Local address: 0.0.0.0:4569)
  Call (Local:Remote): 1325:13821. Timestamp: 3431. Retrans: true. Sequence numbers: Out: 2 In: 1
  No Information Element(s)
-----
 Transaction(1325,13821) resending Frame(2,2) oseq=3 iseq=1 stamp=3437 remaining=1 [068E3D60]
 Sending frame [01E3C568]
-----
VOICE (0x02) - GSM (0x00000002)
  Outgoing to 192.168.11.170:4569 (Local address: 0.0.0.0:4569)
  Call (Local:Remote): 1325:13821. Timestamp: 3437. Retrans: true. Sequence numbers: Out: 3 In: 1
  No Information Element(s)
-----
 'udp:0.0.0.0:5060' received 1237 bytes SIP message from 192.168.11.63:55332 [01E54408]
------
PUBLISH sip:200@192.168.11.63 SIP/2.0
Via: SIP/2.0/UDP 192.168.11.63:55332;rport;branch=z9hG4bKPjbf1dbeaa283541dba9bf2b19e1bdac44
Max-Forwards: 70
From: "Blink on Mouse" ;tag=1f16a0f03815445e8e437b964cf3d2ab
To: "Blink on Mouse" 
Call-ID: 905d70897c4848c6868330f531b188ff
CSeq: 1 PUBLISH
Event: presence
Expires: 600
User-Agent: Blink 0.9.1.2 (Windows)
Content-Type: application/pidf+xml
Content-Length:   767


closedofflinesip%3A200%40192.168.11.632014-08-12T21:02:16.116320+09:00offline2014-08-12T21:02:16.116320+09:00------
 'udp:0.0.0.0:5060' sending code 501 01E4C7E0 to 192.168.11.63:55332 [01E54408]
------
SIP/2.0 501 Not Implemented
Via: SIP/2.0/UDP 192.168.11.63:55332;rport=55332;branch=z9hG4bKPjbf1dbeaa283541dba9bf2b19e1bdac44;received=192.168.11.63
From: "Blink on Mouse" ;tag=1f16a0f03815445e8e437b964cf3d2ab
To: "Blink on Mouse" 
Call-ID: 905d70897c4848c6868330f531b188ff
CSeq: 1 PUBLISH
Server: YATE/5.4.0
Allow: ACK, INVITE, BYE, CANCEL, REGISTER, REFER, OPTIONS, INFO
Content-Length: 0

------
 Transaction(1325,13821) resending Frame(4,4) oseq=2 iseq=1 stamp=3431 remaining=0 [068E3D60]
 Sending frame [01E3C568]
-----
CONTROL (0x04) - ANSWER (0x00000004)
  Outgoing to 192.168.11.170:4569 (Local address: 0.0.0.0:4569)
  Call (Local:Remote): 1325:13821. Timestamp: 3431. Retrans: true. Sequence numbers: Out: 2 In: 1
  No Information Element(s)
-----
 'udp:0.0.0.0:5060' received 673 bytes SIP message from 192.168.11.63:55332 [01E54408]
------
SUBSCRIBE sip:200@192.168.11.63 SIP/2.0
Via: SIP/2.0/UDP 192.168.11.63:55332;rport;branch=z9hG4bKPj0fcea359e8e846e890acb58e2f2121be
Max-Forwards: 70
From: "Blink on Mouse" ;tag=ea317b9ba8ec40948cb36bfad096ff63
To: 
Contact: 
Call-ID: be6cd0176d1244c7a0b07033ee4cc518
CSeq: 2691 SUBSCRIBE
Event: message-summary
Expires: 600
Supported: 100rel, replaces, norefersub, gruu
Accept: application/simple-message-summary
Allow-Events: conference, message-summary, dialog, presence, presence.winfo, xcap-diff, dialog.winfo, refer
User-Agent: Blink 0.9.1.2 (Windows)
Content-Length:  0

------
 'udp:0.0.0.0:5060' sending code 501 01E4CAE0 to 192.168.11.63:55332 [01E54408]
------
SIP/2.0 501 Not Implemented
Via: SIP/2.0/UDP 192.168.11.63:55332;rport=55332;branch=z9hG4bKPj0fcea359e8e846e890acb58e2f2121be;received=192.168.11.63
From: "Blink on Mouse" ;tag=ea317b9ba8ec40948cb36bfad096ff63
To: 
Call-ID: be6cd0176d1244c7a0b07033ee4cc518
CSeq: 2691 SUBSCRIBE
Server: YATE/5.4.0
Allow: ACK, INVITE, BYE, CANCEL, REGISTER, REFER, OPTIONS, INFO
Content-Length: 0

------
 Transaction(1325,13821) Frame(4,4) timed out [068E3D60]
 Transaction(1325,13821). Terminated. Event: 3, Frame(4,4) [068E3D60]
 Transaction(1325,13821) state changed Connected --> Terminated [068E3D60]
>>> DataTranslator::detachChain(068E1EB8,01E23C18)
<<>> DataTranslator::detachChain(01E591E8,01E592D8)
<<< DataTranslator::detachChain
 YateSIPConnection::disconnected() 'offline' [068E63C0]
 YIAXSource 'audio' destroyed total=0 [068E1EB8]
 YIAXConsumer 'audio' destroyed total=25575 [01E592D8]
 Hangup location=peer reason=offline [068E5468]
 Destroyed with reason 'offline' [068E5468]
 Transaction(1325,13821) destroyed remote=192.168.11.170:4569 type=1 state=8 timestamp=18934 [068E3D60]
 YateSIPConnection::hangup() state=3 trans=00000000 error='noroute' code=404 reason='Not Found' [068E63C0]
 RTP/AVP message received
 Wrapper 068E7238 found by ID 'yrtp/1257377061'
 YRTPWrapper::terminate() [068E7238]
 YRTPSource::~YRTPSource() [01E591E8] wrapper=068E7238 ts=124000
 YRTPConsumer::~YRTPConsumer() [01E23C18] wrapper=068E7238 ts=0
 YRTPWrapper::~YRTPWrapper() bidir 'audio' [068E7238]
 Cleaning up RTP 01E23BA8 [068E7238]
 YateSIPConnection::~YateSIPConnection() [068E63C0]
 'udp:0.0.0.0:5060' sending 'BYE sip:76059432@192.168.11.63:55332' 01E4C7E0 to 192.168.11.63:55332 [01E54408]
------
BYE sip:76059432@192.168.11.63:55332 SIP/2.0
Call-ID: 1854940628@192.168.11.63
From: ;tag=694010358
To: ;tag=c8c1fe19dabb40ea9c31cbaaac9a4f2e
Reason: SIP;cause=404;text="Not Found"
P-RTP-Stat: PS=0,OS=0,PR=776,OR=25575,PL=0
Via: SIP/2.0/UDP 192.168.11.63:5060;rport;branch=z9hG4bK332206284
CSeq: 2 BYE
User-Agent: YATE/5.4.0
Max-Forwards: 70
Allow: ACK, INVITE, BYE, CANCEL, REGISTER, REFER, OPTIONS, INFO
Content-Length: 0

/etc/config/bluetooth

config rfcomm
#       option config   /etc/bluetooth/rfcomm.conf
# YASURO
#       option enabled  0
        option enabled  1

/etc/bluetooth/rfcomm.conf

rfcomm0 {
        # Automatically bind the device at startup
        #bind no;
        bind yes;

        # Bluetooth address of the device
        device 00:17:5C:5A:63:5C;

        # RFCOMM channel for the connection
        channel 5;

        # Description of the connection
        comment "Example Bluetooth device";
}

Bluetoothのはなし(4)|Wireless・のおと|サイレックス・テクノロジー株式会社
hcitool“を使って

# hcitool afh "00:17:5C:5A:63:5C"
AFH map: 0xffffffffffffffffff7f

Bluetooth – Wikipedia, the free encyclopedia“によると

終わり。以下は全て余談。


モバイルPSTNのPBX収容“に書いたようなことを考えているのだが、Miax: Mobile IAX。OpenWrtではリポジトリからすぐインストールできることに気づいた。IAXについては”Inter-Asterisk eXchange – Wikipedia, the free encyclopedia“や”IAX – voip-info.org“参照。

2005年以降更新のないのが気になったが、インストールしてみた。OpenWrtのパッケージリポジトリにIAXをサポートするモジュールが入っているのはAsteriskとYateのみ。Asteriskは嫌いなのでYateをインストールしてみた。

しかし、ここでOpenWrtのパッケージリポジトリにあるのはバージョン3.2.0-1-3で、現時点で最新版の5.4.0より大幅に古いということに気づくべきであった。

How to configure Yate as IAX server – Yate Documentation

Usage: miax [-hndupsragmbil]

-h this help
-n source number
-d destination number
-u username
-p password
-s server
-r register
-a audio device
-g gsm codec
-m modem device
-b bluetooth device
-i modem init string
-l log level

‘source’ and ‘destination’ number must be in asterisk format, i.e. 0039xxx
‘server’ default to localhost
‘audio’ default to /dev/dsp0
‘modem’ default to /dev/ttyS0
‘gsm codec’ if you want to use GSM codec in place of default SLINEAR, with gsm codec the dtmf detection is local.
‘bluetooth’ must be in the form source/destination/channel, i.e. ss:ss:ss:ss:ss:ss/dd:dd:dd:dd:dd:dd/nn
‘modem init’ must suply final ‘\r’, i.e. “atz\r”
‘log level’ 0-9, with 0 none and 9 full.

モデム・デバイスについては、”Huawei UMTS USB Stick E169 with Linux“には、”If you have udev you should now have /dev/ttyUSB0, /dev/ttyUSB1 and /dev/ttyUSB2. These are the devices for the UMTS modem, for the GSM modem and a device for sending an receiving SMS, respectively”という記載がある。

source numberとしてはソースファイルmiax.c内で”352″がデフォルト値とされている。

miax -u 100 -p 001 -s 192.168.11.63 -r -m /dev/ttyUSB2 -g

ZoiperYate Clientともエラーで登録できない。
IAX – OLPC
Kiax2はOK。

Voice modem command set – Wikipedia, the free encyclopedia“に出ているATコマンドではなく、”Enabling voice via AT commands -Huawei – Wireless ISPs“にあるもの

IAX (0x06) - NEW (0x00000001)
  Incoming from 127.0.0.1:53554 (Local address: 0.0.0.0:4569)
  Call (Local:Remote): 0:3923. Timestamp: 3. Retrans: false. Sequence numbers: Out: 0 In: 0
  VERSION: 0x0002
  CALLING_NUMBER: 352
  CALLING_NAME: miax
  FORMAT: 0x00000040 (SLIN)
  CAPABILITY: 0x00000040 (SLIN)
  USERNAME: 100
  CALLED_NUMBER: 09066775359
  DNID: 09066775359

コーデックの問題。”Transcoding – Yate Documentation“にトランスコーディングの設定が出ているのだが、この通りにしてもそれが反映されているように思えない。

yate-datacard – Yate datacard channel driver for Huawei GSM / UMTS cards – Google Project Hosting
PBXes.comのsubPBXにするためにAccfile – Yate Documentation

広告

Miax: Mobile Inter Asterisk eXchange Client」への1件のフィードバック

  1. ピンバック: OpenWrt 12.09 Aptitude Adjustment用Asterisk18のChan_Mobileを使う | あくまで暫定措置としてのブログ

コメントを残す

以下に詳細を記入するか、アイコンをクリックしてログインしてください。

WordPress.com ロゴ

WordPress.com アカウントを使ってコメントしています。 ログアウト / 変更 )

Twitter 画像

Twitter アカウントを使ってコメントしています。 ログアウト / 変更 )

Facebook の写真

Facebook アカウントを使ってコメントしています。 ログアウト / 変更 )

Google+ フォト

Google+ アカウントを使ってコメントしています。 ログアウト / 変更 )

%s と連携中