谁能帮我解决这个问题?当我发送此请求时,我在 Wireshark 中看到数据包将通过 1720 tcp 端口发送到 SJPhone。但是 SJPhone 仍然没有响铃。我想让它响起(无论媒体)。
我非常感谢您的支持。我必须缺少消息协议详细信息才能实现这一点。请给我一些积极的建议。
仅供参考:我使用了这个跟踪:http ://www.vconsole.com/usermanuals/sample_isdn_trace.pdf
import java.io.*;
import java.net.*;
public class test
{
public static void main(String[] args) throws UnknownHostException, IOException
{
/* Step 1: simulate the Q.931 packets exchange */
byte st[]=new byte[256];
st[0]=0x08; // protocol discriminator
st[1]=0x02; // length (bytes) of call reference
st[2]=0x02; // call reference (1-15 bytes)
// message type
st[3]=0x05;
// information Elements
st[4]=0x6C; // calling party number
st[5]=0; // unknown
st[6]=0; // unknown
st[7]=1; // "1"
// information elements
st[8]=0x70; // called party number
st[9]=0; // unknown
st[10]=0; // unknown
st[11]=5; // "5"
System.out.println(st);
/* Step 2: by-pass it for testing with tcpdump */
Socket clientSocket = new Socket("localhost", 1720);
DataInputStream input = new DataInputStream(clientSocket.getInputStream());
DataOutputStream outToServer = new DataOutputStream(clientSocket.getOutputStream());
BufferedReader inFromServer = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
outToServer.write(st);
String get;
get = inFromServer.readLine();
System.out.println("FROM SERVER: " + get);
clientSocket.close();
}
}
--更多信息:-当 SJPhone 与 SJPhone 通信时,我看到以下日志:
0000 00 00 03 04 00 06 00 00 00 00 00 00 00 00 08 00 ................
0010 45 00 00 3c 88 6c 40 00 40 06 b4 4d 7f 00 00 01 E..<.l@.@..M....
0020 7f 00 00 01 b4 a8 06 b8 56 f6 c4 b3 00 00 00 00 ........V.......
0030 a0 02 80 18 fe 30 00 00 02 04 40 0c 04 02 08 0a .....0....@.....
0040 02 a1 4c df 00 00 00 00 01 03 03 06 ..L.........
- 当这个 test.java 与 SJPhone 通信时,我看到这个日志:
0000 00 00 03 04 00 06 00 00 00 00 00 00 00 00 08 00 ........ ........
0010 45 00 00 3c 1f ba 40 00 40 06 1d 00 7f 00 00 01 E..<..@. @.......
0020 7f 00 00 01 d6 ca 06 b8 8c e7 41 15 00 00 00 00 ........ ..A.....
0030 a0 02 80 18 fe 30 00 00 02 04 40 0c 04 02 08 0a .....0.. ..@.....
0040 02 a6 5e af 00 00 00 00 01 03 03 06 ..^..... ....
笔记:
可以使用此命令进行友好转储,以查看实时+保存您所看到的内容:tcpdump -XX -s 0 -i lo | 三通 /tmp/log.log