It's caused by the pjturn_srv ignore the turn set permission message.
After I use the coturn server then everything works fine.
2016-03-28 15:37 GMT+08:00 Xiemin Chen <chenxiemin@xxxxxxxxx>:
I start the pjturn server by the following command:[cxm@cxm-Lenovo-Product: pjnath]$ ./bin/pjturn-srv-x86_64-unknown-linux-gnu20:30:45.612 os_core_unix.c !pjlib 2.4.5 for POSIX initialized20:30:45.612 pjlib select() I/O Queue created (0xe88f88)20:30:45.612 srv0xe88b50 TURN server v2.4.5 is running20:30:45.612 udp0xe93e20 Listener UDP:0.0.0.0:34780 created20:30:45.612 tcpl0xe955f0 Listener TCP:0.0.0.0:34780 created20:30:45.612 srv0xe88b50 Listener tcpl0xe955f0/TCP:0.0.0.0:34780 added at index 0Server is runningThen I start the client to test:[cxm@cxm-Lenovo-Product: pjnath]$ ./bin/pjturn-client-x86_64-unknown-linux-gnu -u 100 -p 100 127.0.0.1:3478020:31:33.261 os_core_unix.c !pjlib 2.4.5 for POSIX initialized20:31:33.261 pjlib select() I/O Queue created (0x6c1648)20:31:33.261 peer0 .TX 36 bytes STUN message to 127.0.0.1:34780:--- begin STUN message ---STUN Binding requestHdr: length=16, magic=2112a442, tsx_id=7ccd1f29d7ab58ba000141f2Attributes:SOFTWARE: length=12, value="pjnath-2.4.5"--- end of STUN message ---I allocate a relay:+=====================================================================+| CLIENT | PEER-0 || | || State : NULL | Address: 127.0.0.1:49526 || Relay addr: 0.0.0.0:0 | || | 0 Send data to relay address || a Allocate relay | || p,pp Set permission for peer 0/1 +--------------------------------+| s,ss Send data to peer 0/1 | PEER-1 || b,bb BindChannel to peer 0/1 | || x Delete allocation | Address: 127.0.0.1:38504 |+------------------------------------+ || q Quit d Dump | 1 Send data to relay adderss |+------------------------------------+--------------------------------+>>> a20:32:12.187 udprel0x6c8b30 !TURN client session created20:32:12.187 udprel0x6c8b30 Resolving 127.0.0.1 with DNS A20:32:12.187 udprel0x6c8b30 State changed Null --> Resolving20:32:12.187 client_main.c State Null --> Resolving20:32:12.187 udprel0x6c8b30 State changed Resolving --> Resolved20:32:12.187 client_main.c State Resolving --> Resolved20:32:12.187 udprel0x6c8b30 Connecting to 127.0.0.1:3478020:32:12.187 udprel0x6c8b30 State changed Resolved --> Allocating20:32:12.187 client_main.c State Resolved --> Allocating20:32:12.187 udprel0x6c8b30 .TX 44 bytes STUN message to 127.0.0.1:34780:And send data from client to peer 0 and it works well:+=====================================================================+| CLIENT | PEER-0 || | || State : Ready | Address: 127.0.0.1:34053 || Relay addr: 10.224.71.126:49153 | || | 0 Send data to relay address || a Allocate relay | || p,pp Set permission for peer 0/1 +--------------------------------+| s,ss Send data to peer 0/1 | PEER-1 || b,bb BindChannel to peer 0/1 | || x Delete allocation | Address: 127.0.0.1:54794 |+------------------------------------+ || q Quit d Dump | 1 Send data to relay adderss |+------------------------------------+--------------------------------+>>> s...>>> 20:33:50.314 client_main.c !peer0: received 18 bytes data from 127.0.0.1:49153: Hello from client20:33:50.314 udprel0x23adb3 .RX 56 bytes STUN message from 127.0.0.1:34780:But how to send data from peer to client? I test the command '0' but seems nothing happen:+=====================================================================+| CLIENT | PEER-0 || | || State : Ready | Address: 127.0.0.1:34053 || Relay addr: 10.224.71.126:49153 | || | 0 Send data to relay address || a Allocate relay | || p,pp Set permission for peer 0/1 +--------------------------------+| s,ss Send data to peer 0/1 | PEER-1 || b,bb BindChannel to peer 0/1 | || x Delete allocation | Address: 127.0.0.1:54794 |+------------------------------------+ || q Quit d Dump | 1 Send data to relay adderss |+------------------------------------+--------------------------------+>>> 0
_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@xxxxxxxxxxxxxxx http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org