python pjsua module 30 second timeout

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

 



After being unsuccessful for three days, and extensive searching my last 
resort is to try the mailing list.

We do not get the ACK408  timeout when running

./pjsua-x86_64-unknown-linux-gnu 
--config-file=/home/Dropbox/Downloads/RPi/Audio/pjsip/ken_pc.cfg

we only get it with the python pjsua module under both desktop Ubuntu 
and RPi

We have forwarded ports on router, and again the c-version is working

We have modified sample files with:

....

try:
     # Create library instance
     lib = pj.Lib()

     # Init library with default config
     lib.init(log_cfg = pj.LogConfig(level=4, filename='sip.log', 
callback=log_cb))

     # Create UDP transport which listens to any available port
     trn_cfg = pj.TransportConfig(public_addr='173.209.137.46')
     acc_cfg = pj.AccountConfig('sip.linphone.org', 'kw_martin', 'my_pw')
     acc_cfg.rtp_transport_cfg = trn_cfg
     transport = lib.create_transport(pj.TransportType.UDP, cfg=trn_cfg)
     trnsprt_acc = lib.create_account_for_transport(transport)
     print "\nListening on", transport.info().host,
     print "port", transport.info().port, "\n"

     # Start the library
     lib.start()

     # Create user account config
     print acc_cfg.reg_uri, "  ", acc_cfg.proxy, "  ", acc_cfg.ka_interval
     # Create user account and set callback functions
     acc = lib.create_account(acc_cfg, cb=MyAccountCallback())

     while True:

....

please note, the python pjsua documentation at 
http://www.pjsip.org/python/pjsua.htm is very out of date, for example, 
AccountConfig.rtp_transport_cfg is not described. We have been using 
pjsau.py to try and figure out what is going on.

We could not find any examples for get the rtp acknowledgement correct, 
so the above was by trial and error; using python's pdb module we 
verified rtp_transport_cfg.public_addr is being set and we also see this 
in c=IN IP4 173.209.137.46 (we didn't originally)

Some log output is below. Any help or suggestions are appreciated as we 
are almost ready to give up on the pjsua module. Thank you.
-Ken
p.s. does anyone know of current or coming documentation for using this 
module other than the fairly brief tutorial?

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

14:32:56.095   pjsua_core.c  .TX 1213 bytes Response msg 
200/INVITE/cseq=20 (tdta0x7f47e0013e10) to UDP 91.121.209.194:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 
91.121.209.194;rport=5060;received=91.121.209.194;branch=z9hG4bK.H899c0NcXKpvg4BcNy2rNQ81ee
Via: SIP/2.0/TCP 
37.59.51.72;rport=40289;branch=z9hG4bK.gXQpS556m1vr4UjpB0rFveSXUa
Via: SIP/2.0/TLS 
192.168.1.188:35106;rport=35106;received=173.209.137.46;branch=z9hG4bK.UGXXRm-9O
Record-Route: <sip:91.121.209.194:5060;lr>
Record-Route: <sip:91.121.209.194:5060;transport=tcp;lr>
Record-Route: <sip:37.59.51.72:5060;transport=tcp;lr>
Record-Route: <sips:37.59.51.72:5223;lr>
Call-ID: bP9iYeBrC5
From: <sip:kw_martin_phn@xxxxxxxxxxxxxxxx>;tag=N8bvDINX7
To: <sip:kw_martin at sip.linphone.org>;tag=vgOnIzyYhiSM1o3o63bGNViI7GnQzSG9
CSeq: 20 INVITE
Contact: <sip:kw_martin at 192.168.1.23:34617;ob>
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, 
REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Content-Type: application/sdp
Content-Length:   284

v=0
o=- 3648393144 3648393145 IN IP4 173.209.137.46
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4000 RTP/AVP 98 102
c=IN IP4 173.209.137.46
b=TIAS:64000
a=rtcp:4001 IN IP4 173.209.137.46
a=sendrecv
a=rtpmap:98 speex/16000
a=rtpmap:102 telephone-event/8000
a=fmtp:102 0-16

--end msg--
14:32:56.249   pjsua_core.c  ......TX 540 bytes Request msg 
BYE/cseq=24631 (tdta0x7f47e00a4b20) to UDP 91.121.209.194:5060:
BYE sip:kw_martin_phn at 173.209.137.46:35106;transport=tls SIP/2.0
Via: SIP/2.0/UDP 
192.168.1.23:34617;rport;branch=z9hG4bKPju26o3yooJZrPybg0UV.ihgek1HEgOAo-
Max-Forwards: 70
From: <sip:kw_martin@xxxxxxxxxxxxxxxx>;tag=vgOnIzyYhiSM1o3o63bGNViI7GnQzSG9
To: <sip:kw_martin_phn at sip.linphone.org>;tag=N8bvDINX7
Call-ID: bP9iYeBrC5
CSeq: 24631 BYE
Route: <sip:91.121.209.194:5060;lr>
Route: <sip:91.121.209.194:5060;transport=tcp;lr>
Route: <sip:37.59.51.72:5060;transport=tcp;lr>
Route: <sips:37.59.51.72:5223;lr>
Content-Length:  0


--end msg--
14:32:56.659   pjsua_core.c  .RX 380 bytes Response msg 
200/BYE/cseq=24631 (rdata0x7f47e0002a28) from UDP 91.121.209.194:5060:
SIP/2.0 200 Ok
Via: SIP/2.0/UDP 
192.168.1.23:34617;rport=34617;branch=z9hG4bKPju26o3yooJZrPybg0UV.ihgek1HEgOAo-
From: <sip:kw_martin@xxxxxxxxxxxxxxxx>;tag=vgOnIzyYhiSM1o3o63bGNViI7GnQzSG9
To: <sip:kw_martin_phn at sip.linphone.org>;tag=N8bvDINX7
Call-ID: bP9iYeBrC5
CSeq: 24631 BYE
User-Agent: LinphoneAndroid/2.4.1 (belle-sip/1.4.1)
Supported: outbound
Content-Length: 0


--end msg--
Call is  DISCONNCTD last code = 408 (Request Timeout)
14:32:56.659  pjsua_media.c  .....Call 0: deinitializing media..
14:32:56.659  pjsua_media.c  .......Media stream call00:0 is destroyed
14:32:57.682    pjsua_aud.c  Closing sound device after idle for 1 second(s)
14:32:57.682    pjsua_aud.c  .Closing HDA Intel PCH: ALC887-VD Analog 
(hw:0,0) sound playback device and HDA Intel PCH: ALC887-VD Analog 
(hw:0,0) sound capture device

***************************************************************************************************************************************************************

below is some selected ouput from the log file:

--end msg--
14:32:40.262 strm0x7f47e001 !Frame lost, recovered!
14:32:40.282 strm0x7f47e001  Jitter buffer starts returning normal 
frames (af
ter 1 empty/lost)
14:32:41.802 strm0x7f47e001  Frame lost, recovered!
14:32:41.822 strm0x7f47e001  Jitter buffer starts returning normal 
frames (af
ter 1 empty/lost)
14:32:42.442 strm0x7f47e001  Starting silence
14:32:42.482 strm0x7f47e001  Start talksprut..
14:32:42.662 strm0x7f47e001  Jitter buffer empty (prefetch=0), plc invoked
14:32:42.683 strm0x7f47e001  Jitter buffer starts returning normal 
frames (af
ter 1 empty/lost)
14:32:42.782 strm0x7f47e001  Jitter buffer empty (prefetch=0), plc invoked
14:32:42.802 strm0x7f47e001  Jitter buffer starts returning normal 
frames (af
ter 1 empty/lost)
14:32:43.603 strm0x7f47e001  Jitter buffer empty (prefetch=0), plc invoked
14:32:43.622 strm0x7f47e001  Jitter buffer starts returning normal 
frames (af
ter 1 empty/lost)
14:32:43.961 tsx0x7f47e0005 !Retransmit timer event
14:32:43.961 tsx0x7f47e0005  .Retransmiting Response msg 
200/INVITE/cseq=20 (
tdta0x7f47e0013e10), count=6, restart?=1
14:32:43.961   pjsua_core.c  .TX 1213 bytes Response msg 
200/INVITE/cseq=20 (
tdta0x7f47e0013e10) to UDP 91.121.209.194:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 
91.121.209.194;rport=5060;received=91.121.209.194;branch=z9h
G4bK.H899c0NcXKpvg4BcNy2rNQ81ee
Via: SIP/2.0/TCP 
37.59.51.72;rport=40289;branch=z9hG4bK.gXQpS556m1vr4UjpB0rFv
eSXUa
Via: SIP/2.0/TLS 
192.168.1.188:35106;rport=35106;received=173.209.137.46;bran
ch=z9hG4bK.UGXXRm-9O
Record-Route: <sip:91.121.209.194:5060;lr>
Record-Route: <sip:91.121.209.194:5060;transport=tcp;lr>
Record-Route: <sip:37.59.51.72:5060;transport=tcp;lr>
Record-Route: <sips:37.59.51.72:5223;lr>
Call-ID: bP9iYeBrC5
From: <sip:kw_martin_phn@xxxxxxxxxxxxxxxx>;tag=N8bvDINX7
To: <sip:kw_martin at sip.linphone.org>;tag=vgOnIzyYhiSM1o3o63bGNViI7GnQzSG9
CSeq: 20 INVITE
Contact: <sip:kw_martin at 192.168.1.23:34617;ob>
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, 
REFE
R, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Content-Type: application/sdp
Content-Length:   284

v=0
o=- 3648393144 3648393145 IN IP4 173.209.137.46
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4000 RTP/AVP 98 102
c=IN IP4 173.209.137.46
b=TIAS:64000
a=rtcp:4001 IN IP4 173.209.137.46
a=sendrecv
a=rtpmap:98 speex/16000
a=rtpmap:102 telephone-event/8000
a=fmtp:102 0-16

--end msg--
14:32:44.862 strm0x7f47e001 !Jitter buffer empty (prefetch=0), plc invoked
14:32:44.882 strm0x7f47e001  Jitter buffer starts returning normal 
frames (af
ter 1 empty/lost)
14:32:47.042 strm0x7f47e001  Jitter buffer empty (prefetch=0), plc invoked
14:32:47.062 strm0x7f47e001  Jitter buffer starts returning normal 
frames (af
ter 1 empty/lost)
14:32:48.005 tsx0x7f47e0005 !Retransmit timer event
14:32:48.005 tsx0x7f47e0005  .Retransmiting Response msg 
200/INVITE/cseq=20 (
tdta0x7f47e0013e10), count=7, restart?=1
14:32:48.005   pjsua_core.c  .TX 1213 bytes Response msg 
200/INVITE/cseq=20 (
tdta0x7f47e0013e10) to UDP 91.121.209.194:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 
91.121.209.194;rport=5060;received=91.121.209.194;branch=z9h
G4bK.H899c0NcXKpvg4BcNy2rNQ81ee
Via: SIP/2.0/TCP 
37.59.51.72;rport=40289;branch=z9hG4bK.gXQpS556m1vr4UjpB0rFv
eSXUa
Via: SIP/2.0/TLS 
192.168.1.188:35106;rport=35106;received=173.209.137.46;bran
ch=z9hG4bK.UGXXRm-9O
Record-Route: <sip:91.121.209.194:5060;lr>
Record-Route: <sip:91.121.209.194:5060;transport=tcp;lr>
Record-Route: <sip:37.59.51.72:5060;transport=tcp;lr>
Record-Route: <sips:37.59.51.72:5223;lr>
Call-ID: bP9iYeBrC5
From: <sip:kw_martin_phn@xxxxxxxxxxxxxxxx>;tag=N8bvDINX7
To: <sip:kw_martin at sip.linphone.org>;tag=vgOnIzyYhiSM1o3o63bGNViI7GnQzSG9
CSeq: 20 INVITE
Contact: <sip:kw_martin at 192.168.1.23:34617;ob>
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, 
REFE
R, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Content-Type: application/sdp
Content-Length:   284

v=0
o=- 3648393144 3648393145 IN IP4 173.209.137.46
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4000 RTP/AVP 98 102
c=IN IP4 173.209.137.46
b=TIAS:64000
a=rtcp:4001 IN IP4 173.209.137.46
a=sendrecv
a=rtpmap:98 speex/16000
a=rtpmap:102 telephone-event/8000
a=fmtp:102 0-16

--end msg--
14:32:48.362 strm0x7f47e001 !Jitter buffer empty (prefetch=0), plc invoked
14:32:48.382 strm0x7f47e001  Jitter buffer starts returning normal 
frames (af
ter 1 empty/lost)
14:32:49.901    pjsua_acc.c !Sending 2 bytes keep-alive packet for acc 1 
to 9
1.121.209.194:5060
14:32:49.901 tdta0x7f47e00a  Destroying txdata raw
14:32:50.202 strm0x7f47e001 !Jitter buffer empty (prefetch=0), plc invoked
14:32:50.242 strm0x7f47e001  Jitter buffer starts returning normal 
frames (af
ter 2 empty/lost)
14:32:50.502 strm0x7f47e001  Jitter buffer empty (prefetch=0), plc invoked
14:32:50.583 strm0x7f47e001  Jitter buffer starts returning normal 
frames (af
ter 4 empty/lost)
14:32:51.062 strm0x7f47e001  Jitter buffer empty (prefetch=0), plc invoked
14:32:51.082 strm0x7f47e001  Jitter buffer starts returning normal 
frames (af
ter 1 empty/lost)
14:32:51.482 strm0x7f47e001  Starting silence
14:32:51.502 strm0x7f47e001  Start talksprut..
14:32:52.052 tsx0x7f47e0005 !Retransmit timer event
14:32:52.052 tsx0x7f47e0005  .Retransmiting Response msg 
200/INVITE/cseq=20 (
tdta0x7f47e0013e10), count=8, restart?=1
14:32:52.052   pjsua_core.c  .TX 1213 bytes Response msg 
200/INVITE/cseq=20 (
tdta0x7f47e0013e10) to UDP 91.121.209.194:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 
91.121.209.194;rport=5060;received=91.121.209.194;branch=z9h
G4bK.H899c0NcXKpvg4BcNy2rNQ81ee
Via: SIP/2.0/TCP 
37.59.51.72;rport=40289;branch=z9hG4bK.gXQpS556m1vr4UjpB0rFv
eSXUa
Via: SIP/2.0/TLS 
192.168.1.188:35106;rport=35106;received=173.209.137.46;bran
ch=z9hG4bK.UGXXRm-9O
Record-Route: <sip:91.121.209.194:5060;lr>
Record-Route: <sip:91.121.209.194:5060;transport=tcp;lr>
Record-Route: <sip:37.59.51.72:5060;transport=tcp;lr>
Record-Route: <sips:37.59.51.72:5223;lr>
Call-ID: bP9iYeBrC5
From: <sip:kw_martin_phn@xxxxxxxxxxxxxxxx>;tag=N8bvDINX7
To: <sip:kw_martin at sip.linphone.org>;tag=vgOnIzyYhiSM1o3o63bGNViI7GnQzSG9
CSeq: 20 INVITE
Contact: <sip:kw_martin at 192.168.1.23:34617;ob>
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, 
REFE
R, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Content-Type: application/sdp
Content-Length:   284

v=0
o=- 3648393144 3648393145 IN IP4 173.209.137.46
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4000 RTP/AVP 98 102
c=IN IP4 173.209.137.46
b=TIAS:64000
a=rtcp:4001 IN IP4 173.209.137.46
a=sendrecv
a=rtpmap:98 speex/16000
a=rtpmap:102 telephone-event/8000
a=fmtp:102 0-16

--end msg--
14:32:52.965 strm0x7f47e001 !RTP status: badpt=0, badssrc=0, dup=0, 
outorder=
-1, probation=0, restart=0
14:32:53.142 strm0x7f47e001 !Jitter buffer empty (prefetch=0), plc invoked
14:32:53.162 strm0x7f47e001  Jitter buffer starts returning normal 
frames (af
ter 1 empty/lost)
14:32:54.682 strm0x7f47e001  Frame lost, recovered!
14:32:54.702 strm0x7f47e001  Jitter buffer starts returning normal 
frames (af
ter 1 empty/lost)
14:32:55.222 strm0x7f47e001  Starting silence
14:32:55.382 strm0x7f47e001  Start talksprut..
14:32:55.402 strm0x7f47e001  Starting silence
14:32:55.462 strm0x7f47e001  Start talksprut..
14:32:55.482 strm0x7f47e001  Starting silence
14:32:55.502 strm0x7f47e001  Frame lost, recovered!
14:32:55.522 strm0x7f47e001  Jitter buffer starts returning normal 
frames (af
ter 1 empty/lost)
14:32:55.562 strm0x7f47e001  Start talksprut..
14:32:55.602 strm0x7f47e001  Starting silence
14:32:55.682 strm0x7f47e001  Start talksprut..
14:32:55.702 strm0x7f47e001  Starting silence
14:32:55.741 strm0x7f47e001  Start talksprut..
14:32:56.082 strm0x7f47e001  Frame lost, recovered!
14:32:56.095 tsx0x7f47e0005 !Retransmit timer event
14:32:56.095 tsx0x7f47e0005  .Retransmiting Response msg 
200/INVITE/cseq=20 (
tdta0x7f47e0013e10), count=9, restart?=1
14:32:56.095   pjsua_core.c  .TX 1213 bytes Response msg 
200/INVITE/cseq=20 (
tdta0x7f47e0013e10) to UDP 91.121.209.194:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 
91.121.209.194;rport=5060;received=91.121.209.194;branch=z9h
G4bK.H899c0NcXKpvg4BcNy2rNQ81ee
Via: SIP/2.0/TCP 
37.59.51.72;rport=40289;branch=z9hG4bK.gXQpS556m1vr4UjpB0rFv
eSXUa
Via: SIP/2.0/TLS 
192.168.1.188:35106;rport=35106;received=173.209.137.46;bran
ch=z9hG4bK.UGXXRm-9O
Record-Route: <sip:91.121.209.194:5060;lr>
Record-Route: <sip:91.121.209.194:5060;transport=tcp;lr>
Record-Route: <sip:37.59.51.72:5060;transport=tcp;lr>
Record-Route: <sips:37.59.51.72:5223;lr>
Call-ID: bP9iYeBrC5
From: <sip:kw_martin_phn@xxxxxxxxxxxxxxxx>;tag=N8bvDINX7
To: <sip:kw_martin at sip.linphone.org>;tag=vgOnIzyYhiSM1o3o63bGNViI7GnQzSG9
CSeq: 20 INVITE
Contact: <sip:kw_martin at 192.168.1.23:34617;ob>
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, 
REFE
R, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Content-Type: application/sdp
Content-Length:   284

v=0
o=- 3648393144 3648393145 IN IP4 173.209.137.46
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4000 RTP/AVP 98 102
c=IN IP4 173.209.137.46
b=TIAS:64000
a=rtcp:4001 IN IP4 173.209.137.46
a=sendrecv
a=rtpmap:98 speex/16000
a=rtpmap:102 telephone-event/8000
a=fmtp:102 0-16

--end msg--
14:32:56.102 strm0x7f47e001 !Jitter buffer starts returning normal 
frames (af
ter 1 empty/lost)
14:32:56.249 tsx0x7f47e0005 !Timeout timer event
14:32:56.249 tsx0x7f47e0005  .State changed from Completed to 
Terminated, eve
nt=TIMER
14:32:56.249 dlg0x7f47e0001  ..Transaction tsx0x7f47e0005a78 state 
changed to
  Terminated
14:32:56.249       endpoint  ...Request msg BYE/cseq=24632 
(tdta0x7f47e00a4b2
0) created.
14:32:56.249 inv0x7f47e0001  ....Sending Request msg BYE/cseq=24632 
(tdta0x7f
47e00a4b20)
14:32:56.249 dlg0x7f47e0001  .....Sending Request msg BYE/cseq=24632 
(tdta0x7
f47e00a4b20)
14:32:56.249 tsx0x7f47e0017  ......Transaction created for Request msg 
BYE/cs
eq=24631 (tdta0x7f47e00a4b20)
14:32:56.249 tsx0x7f47e0017  .....Sending Request msg BYE/cseq=24631 
(tdta0x7
f47e00a4b20) in state Null
14:32:56.249  sip_resolve.c  ......Target '91.121.209.194:5060' 
type=Unspecif
ied resolved to '91.121.209.194:5060' type=UDP (UDP transport)





[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