PJSUA fail to call in same LAN when ICE&STUN enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,
   I'm playing with PJSIP 2.0 on windows and find PJSUA peer to peer call
will fail if ICE&STUN enabled in LAN.
   PJSUA seems hang after creating ICE stream transport;

   but if only ICE enabled, call will be success, don't know why?

   My test environment is:
   PC A: 192.168.0.2
   PC B:192.168.0.86
   both sides' pjsua config with "--use-ice --stun-srv=stun.pjsip.org"
param.

    PC B call PC A, and following log is from PC B:

21:33:25.015 os_core_win32. !pjlib 2.0.0-beta-svn for win32 initialized
21:33:25.078 sip_endpoint.c  .Creating endpoint instance...
21:33:25.078          pjlib  .select() I/O Queue created (00D57474)
21:33:25.078 sip_endpoint.c  .Module "mod-msg-print" registered
21:33:25.078 sip_transport.  .Transport manager created.
21:33:25.078   pjsua_core.c  .PJSUA state changed: NULL --> CREATED
21:33:25.078 sip_endpoint.c  .Module "mod-pjsua-log" registered
21:33:25.078 sip_endpoint.c  .Module "mod-tsx-layer" registered
21:33:25.078 sip_endpoint.c  .Module "mod-stateful-util" registered
21:33:25.078 sip_endpoint.c  .Module "mod-ua" registered
21:33:25.078 sip_endpoint.c  .Module "mod-100rel" registered
21:33:25.078 sip_endpoint.c  .Module "mod-pjsua" registered
21:33:25.078 sip_endpoint.c  .Module "mod-invite" registered
21:33:25.078   pjsua_core.c  .Trying STUN server stun.pjsip.org (1 of 1)..
21:33:25.484     wmme_dev.c  ..WMME found 3 devices:
21:33:25.484     wmme_dev.c  .. dev_id 0: Wave mapper  (in=2, out=2)
21:33:25.484     wmme_dev.c  .. dev_id 1: Realtek HD Audio Input  (in=2,
out=0)
21:33:25.484     wmme_dev.c  .. dev_id 2: Realtek HD Audio output  (in=0,
out=2)

21:33:25.484     wmme_dev.c  ..WMME initialized
21:33:25.484          pjlib  ..select() I/O Queue created (010712CC)
21:33:25.484    pjsua_vid.c  ..Initializing video subsystem..
21:33:25.593    dshow_dev.c  ...DShow has 3 devices:
21:33:25.593    dshow_dev.c  ... dev_id 0: USB  (capture)
21:33:25.593    dshow_dev.c  ... dev_id 1: Google Camera Adapter 0 (capture)
21:33:25.593    dshow_dev.c  ... dev_id 2: Google Camera Adapter 1 (capture)
21:33:25.609      sdl_dev.c  ...SDL 1.3 initialized
21:33:25.609 sip_endpoint.c  .Module "mod-evsub" registered
21:33:25.609 sip_endpoint.c  .Module "mod-presence" registered
21:33:25.609 sip_endpoint.c  .Module "mod-mwi" registered
21:33:25.609 sip_endpoint.c  .Module "mod-refer" registered
21:33:25.609 sip_endpoint.c  .Module "mod-pjsua-pres" registered
21:33:25.609 sip_endpoint.c  .Module "mod-pjsua-im" registered
21:33:25.609 sip_endpoint.c  .Module "mod-pjsua-options" registered
21:33:25.609   pjsua_core.c  .1 SIP worker threads created
21:33:25.609   pjsua_core.c !.pjsua version 2.0.0-beta-svn for
win32-5.1/i386/ms
vc-14.0 initialized
21:33:25.609   pjsua_core.c  .PJSUA state changed: CREATED --> INIT
21:33:25.609 sip_endpoint.c  Module "mod-default-handler" registered
21:33:25.734    stunresolve  .STUN mapped address found/changed:
125.114.108.184
:64041
21:33:25.750   pjsua_core.c  .STUN resolution success, using stun.pjsip.org,
add
ress is 208.109.222.137:3478
21:33:26.078   pjsua_core.c  SIP UDP socket reachable at
125.114.108.184:64165
21:33:26.078    udp00D5CFA8  SIP UDP transport started, published address
is 125
.114.108.184:64165
21:33:26.078    pjsua_acc.c  Adding account: id=<sip:125.114.108.184:64165>
21:33:26.078    pjsua_acc.c !.Account <sip:125.114.108.184:64165> added
with id
0
21:33:26.078    pjsua_acc.c  Modifying accunt 0
21:33:26.078    pjsua_acc.c  Acc 0: setting online status to 1..
21:33:26.093    tcplis:5060  SIP TCP listener ready for incoming
connections at
192.168.0.86:5060
21:33:26.093    pjsua_acc.c  Adding account: id=<sip:192.168.0.86:5060
;transport
=TCP>
21:33:26.093    pjsua_acc.c  .Account <sip:192.168.0.86:5060;transport=TCP>
adde
d with id 1
21:33:26.093    pjsua_acc.c  Modifying accunt 1
21:33:26.093    pjsua_acc.c  Acc 1: setting online status to 1..
21:33:26.093   pjsua_core.c  PJSUA state changed: INIT --> STARTING
21:33:26.093 sip_endpoint.c  .Module "mod-unsolicited-mwi" registered
21:33:26.093   pjsua_core.c  .PJSUA state changed: STARTING --> RUNNING
>>>>
Account list:
  [ 0] <sip:125.114.108.184:64165>: does not register
       Online status: Online
 *[ 1] <sip:192.168.0.86:5060;transport=TCP>: does not register
       Online status: Online
Buddy list:
 -none-

+=============================================================================+
|       Call Commands:         |   Buddy, IM & Presence:  |     Account:
   |
|                              |                          |
  |
|  m  Make new call            | +b  Add new buddy       .| +a  Add new
accnt |
|  M  Make multiple calls      | -b  Delete buddy         | -a  Delete
accnt. |
|  a  Answer call              |  i  Send IM              | !a  Modify
accnt. |
|  h  Hangup call  (ha=all)    |  s  Subscribe presence   | rr
 (Re-)register |
|  H  Hold call                |  u  Unsubscribe presence | ru  Unregister
   |
|  v  re-inVite (release hold) |  t  ToGgle Online status |  >  Cycle next
ac.|
|  U  send UPDATE              |  T  Set online status    |  <  Cycle prev
ac.|
| ],[ Select next/prev call
 +--------------------------+-------------------+
|  x  Xfer call                |      Media Commands:     |  Status &
Config: |
|  X  Xfer with Replaces       |                          |
  |
|  #  Send RFC 2833 DTMF       | cl  List ports           |  d  Dump status
  |
|  *  Send DTMF with INFO      | cc  Connect port         | dd  Dump
detailed |
| dq  Dump curr. call quality  | cd  Disconnect port      | dc  Dump config
  |
|                              |  V  Adjust audio Volume  |  f  Save config
  |
|  S  Send arbitrary REQUEST   | Cp  Codec priorities     |
  |
+-----------------------------------------------------------------------------+
| Video: "vid help" for more info
  |
+-----------------------------------------------------------------------------+
|  q  QUIT   L  ReLoad   sleep MS   echo [0|1|txt]     n: detect NAT type
  |
+=============================================================================+
You have 0 active call
>>> 21:33:26.515    pjsua_app.c  .NAT detected as Full Cone
m
(You currently have 0 calls)
Buddy list:
 -none-

Choices:
   0         For current dialog.
  -1         All 0 buddies in buddy list
  [1 - 0]    Select from buddy list
  URL        An URL
  <Enter>    Empty input (or 'q') to cancel
Make call: sip:192.168.0.2
21:33:48.375   pjsua_call.c !Making call with acc #1 to sip:192.168.0.2
21:33:48.375  pjsua_media.c  .Set sound device: capture=-1, playback=-2
21:33:48.375    pjsua_app.c  ..Turning sound device ON
21:33:48.375  pjsua_media.c  ..Opening sound device PCM at 8000/1/20ms
21:33:48.390     wmme_dev.c  ... WaveAPI Sound player "Wave mapper"
initialized
(format=PCM, clock_rate=8000, channel_count=1, samples_per_frame=160 (20ms))
21:33:48.406     wmme_dev.c  ... WaveAPI Sound recorder "Wave mapper"
initialize
d (format=PCM, clock_rate=8000, channel_count=1, samples_per_frame=160
(20ms))
21:33:48.421     ec00D5F150  ...Echo suppressor created, clock_rate=8000,
channe
l=1, samples per frame=160, tail length=200 ms, latency=100 ms
21:33:48.421     wmme_dev.c  ...WMME playback stream started
21:33:48.421     wmme_dev.c  ...WMME capture stream started
21:33:48.421  pjsua_media.c  .Call 0: initializing media..
21:33:48.421        icetp00  ..Creating ICE stream transport with 2
component(s)

21:33:48.421        icetp00  ...Comp 1: srflx candidate starts Binding
discovery

21:33:48.468        icetp00 !...Comp 1: host candidate 192.168.0.86:4891added
21:33:48.468        icetp00  ...Comp 2: srflx candidate starts Binding
discovery

21:33:48.515        icetp00 !...Comp 2: host candidate 192.168.0.86:4894added
21:33:48.515        icetp00  ...ICE stream transport created
21:33:48.515  pjsua_media.c  ..Media index 0 selected for audio call 0
>>> 21:33:48.750 stuntp0108DF88  .STUN mapped address found/changed:
125.114.108
.184:64105
21:33:48.765        icetp00  .Comp 1: Binding discovery complete, srflx
address
is 125.114.108.184:64105
21:33:48.796 stuntp01090D10  .STUN mapped address found/changed:
125.114.108.184
:64161
21:33:48.812        icetp00  .Comp 2: Binding discovery complete, srflx
address
is 125.114.108.184:64161
21:33:49.265     ec00D5F150 !Underflow, buf_cnt=0, will generate 1 frame
21:33:50.843     ec00D5F150 !Underflow, buf_cnt=0, will generate 1 frame
21:33:51.625     ec00D5F150  Underflow, buf_cnt=0, will generate 1 frame
21:33:53.218     ec00D5F150  Underflow, buf_cnt=0, will generate 1 frame
21:33:53.437   sound_port.c  EC suspended because of inactivity


BRs,
Bo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120106/03f2fe0b/attachment-0001.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux