3 | | Sample: iPhone OS-3.2/arm/iOS-SDK-4.1 |
4 | | {{{ |
5 | | 18:04:53.291 stunresolve RX 88 bytes STUN message from 212.64.151.160:4478: |
6 | | --- begin STUN message --- |
7 | | STUN Binding success response |
8 | | Hdr: length=68, magic=2112a442, tsx_id=fbf145dab360c9f000017327 |
9 | | Attributes: |
10 | | MAPPED-ADDRESS: length=8, IPv4 addr=109.186.67.85:61160 |
11 | | SOURCE-ADDRESS: length=8, IPv4 addr=212.64.151.160:4478 |
12 | | CHANGED-ADDRESS: length=8, IPv4 addr=46.38.162.185:4479 |
13 | | Attr 0x8020: length=8 |
14 | | SOFTWARE: length=16, value="Vovida.org 0.96" |
15 | | --- end of STUN message --- |
| 3 | Bug: |
| 4 | 1. Bug: if UDP packet is lost, the resolver will wait until all retransmissions are done, which means 4 seconds delay. |
17 | | 18:04:53.291 stunresolve STUN mapped address found/changed: 109.186.67.85:61160 |
18 | | 18:04:53.299 pjsua_core.c STUN resolution success, using 212.64.151.160:4478, address is 212.64.151.160:4478 |
19 | | 18:04:53.299 stuntsx0x87655 STUN client transaction destroyed |
20 | | 18:04:54.826 stun_simple.c Warning: unknown attr type 8020 in attr 3. Attribute was ignored. |
21 | | 18:04:54.826 stun_simple.c Warning: unknown attr type 8022 in attr 4. Attribute was ignored. |
22 | | 18:04:54.828 stun_simple.c Warning: unknown attr type 8020 in attr 3. Attribute was ignored. |
23 | | 18:04:54.829 stun_simple.c Warning: unknown attr type 8022 in attr 4. Attribute was ignored. |
24 | | 18:04:57.303 pjsua_core.c SIP UDP socket reachable at 109.186.67.85:1024 |
25 | | 18:04:57.305 udp0x869000 SIP UDP transport started, published address is 109.186.67.85:1024 |
26 | | }}} |
| 6 | Enhancements: |
| 7 | 1. Allow caller to specify only 1 STUN server, for faster result. |
| 8 | 1. If both servers point to the same address, only one will be used. |
| 9 | 1. Decrease retransmission delay from 1000 ms to 500 ms for more responsive result. |
| 10 | 1. Reduce memory consumption (from 1024 to 400 bytes). |
| 11 | |