Hello,
I want to implement PJSIP to Android device:
Device Info:
- ARMv7 Processor rev 4 (v7l)
- Android Version 4.2.2 Jelly Bean MR1
- API Level 17
- Kernel Linux, armvz7l, 3.4.39+
I tried CSipSimple and also latest PJSIP v2.6 with telnet cli.
The problem is that after ringback tone which working on speakerbox of gxv3240 there is no sounds after call accept.
I got log 05:28:58.292 Master/sound Underflow, buf_cnt=0, will generate 1 frame
In Wireshark trace I see RTP packets from remote side but the log does not show anything
RX pt=8, last update:00h:00m:04.400s ago
total 0pkt 0B (0B +IP hdr) @avg=0bps/0bps
Also I don't see RTP packets from gxv3240 in Wireshark trace. But log shows:
TX pt=8, ptime=20, last update:never
total 182pkt 29.1KB (36.4KB +IP hdr) @avg=24.0Kbps/30.0Kbps
Is there some access restrictions?
logs:
localhost>
localhost>
localhost>
localhost> call new sip:1027@172.18.96.170
05:28:46.188 pjsua_app_cli. !AUDIO DEVICE INPUT - audDevName=Android JNI, count=0
05:28:46.188 pjsua_app_cli. AUDIO DEVICE OUTPUT - audDevName=Android JNI, count=0
(You currently have 0 calls)
05:28:46.188 pjsua_call.c Making call with acc #2 to sip:1027@172.18.96.170
05:28:46.188 pjsua_aud.c .Set sound device: capture=-1, playback=-2
05:28:46.188 pjsua_app.c ..Turning sound device ON
05:28:46.188 pjsua_aud.c ..Opening sound device (speaker + mic) PCM@8000/1/20ms
05:28:46.188 android_jni_de ...Creating Android JNI stream
05:28:46.194 android_jni_de ...Using audio input source : 7
05:28:46.198 android_jni_de ...Audio record initialized successfully.
05:28:46.201 android_jni_de ...Audio track initialized successfully.
05:28:46.202 echo_webrtc.c ...WebRTC AEC successfully created with options 0
05:28:46.202 ec0x682de728 ...WebRTC AEC created, clock_rate=8000, channel=1, samples per frame=160, tail length=200 ms, latency=100 ms
05:28:46.202 android_jni_de ...Android JNI stream started
05:28:46.204 pjsua_media.c .Call 0: initializing media..
05:28:46.206 android_jni_de Setting thread priority successful
05:28:46.208 android_jni_de Setting thread priority successful
05:28:46.210 pjsua_media.c !..RTP socket reachable at 172.18.96.147:4000
05:28:46.211 pjsua_media.c ..RTCP socket reachable at 172.18.96.147:4001
05:28:46.211 pjsua_media.c ..Media index 0 selected for audio call 0
05:28:46.215 pjsua_core.c ....TX 1073 bytes Request msg INVITE/cseq=15358 (tdta0x682f91d8) to UDP 172.18.96.170:5060:
INVITE sip:1027@172.18.96.170 SIP/2.0
Via: SIP/2.0/UDP 172.18.96.147:5060;rport;branch=z9hG4bKPjfd16842b-6e63-4a1b-9f5b-9a4501dcff02
Max-Forwards: 70
From: <sip:1077@172.18.96.170>;tag=b83d61f0-1ad3-440d-819a-17a22683e9dc
Contact: <sip:1077@172.18.96.147:5060;ob>
Call-ID: 6eddbe93-37a4-4f01-a736-e8b688b05c1f
CSeq: 15358 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: PJSUA v2.6 Linux-3.4.39/armv7l
Content-Type: application/sdp
Content-Length: 428
v=0
o=- 3703397326 3703397326 IN IP4 172.18.96.147
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4000 RTP/AVP 98 97 99 3 0 8 9 96
c=IN IP4 172.18.96.147
b=TIAS:64000
a=rtcp:4001 IN IP4 172.18.96.147
a=sendrecv
a=rtpmap:98 speex/16000
a=rtpmap:97 speex/8000
a=rtpmap:99 speex/32000
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
--end msg--
05:28:46.215 pjsua_app.c .......Call 0 state changed to CALLING
localhost> 05:28:46.226 pjsua_core.c .RX 335 bytes Response msg 100/INVITE/cseq=15358 (rdata0x64fab1dc) from UDP 172.18.96.170:5060:
SIP/2.0 100 Trying
Call-ID: 6eddbe93-37a4-4f01-a736-e8b688b05c1f
CSeq: 15358 INVITE
From: <sip:1077@172.18.96.170>;tag=b83d61f0-1ad3-440d-819a-17a22683e9dc
To: <sip:1027@172.18.96.170>
Via: SIP/2.0/UDP 172.18.96.147:5060;received=172.18.96.147;branch=z9hG4bKPjfd16842b-6e63-4a1b-9f5b-9a4501dcff02;rport=5060
Content-Length: 0
--end msg--
05:28:47.434 pjsua_core.c .RX 582 bytes Response msg 180/INVITE/cseq=15358 (rdata0x64fab1dc) from UDP 172.18.96.170:5060:
SIP/2.0 180 Ringing
Allow: INVITE,ACK,CANCEL,INFO,PRACK,UPDATE,OPTIONS,REGISTER,REFER,SUBSCRIBE,PUBLISH
Call-ID: 6eddbe93-37a4-4f01-a736-e8b688b05c1f
Contact: "1027_SIP" <sip:1027@172.18.96.170:5060>
CSeq: 15358 INVITE
From: <sip:1077@172.18.96.170>;tag=b83d61f0-1ad3-440d-819a-17a22683e9dc
To: "1027_SIP" <sip:1027@172.18.96.170>;tag=ub2vn9ehal
Require: 100rel
Via: SIP/2.0/UDP 172.18.96.147:5060;received=172.18.96.147;branch=z9hG4bKPjfd16842b-6e63-4a1b-9f5b-9a4501dcff02;rport=5060
RSeq: 1
P-Asserted-Identity: "1027_SIP" <sip:1027@172.18.96.170>
Content-Length: 0
--end msg--
05:28:47.436 pjsua_aud.c .....Conf connect: 1 --> 0
05:28:47.436 conference.c ......Port 1 (ringback) transmitting to port 0 (Android JNI)
05:28:47.436 pjsua_app.c .....Call 0 state changed to EARLY (180 Ringing)
05:28:47.437 pjsua_core.c ......TX 383 bytes Request msg PRACK/cseq=15359 (tdta0x68304888) to UDP 172.18.96.170:5060:
PRACK sip:1027@172.18.96.170:5060 SIP/2.0
Via: SIP/2.0/UDP 172.18.96.147:5060;rport;branch=z9hG4bKPj6f3c7b77-60e0-446c-806e-629f61c59c6f
Max-Forwards: 70
From: <sip:1077@172.18.96.170>;tag=b83d61f0-1ad3-440d-819a-17a22683e9dc
To: sip:1027@172.18.96.170;tag=ub2vn9ehal
Call-ID: 6eddbe93-37a4-4f01-a736-e8b688b05c1f
CSeq: 15359 PRACK
RAck: 1 15358 INVITE
Content-Length: 0
--end msg--
05:28:47.443 pjsua_core.c .RX 345 bytes Response msg 200/PRACK/cseq=15359 (rdata0x64fab1dc) from UDP 172.18.96.170:5060:
SIP/2.0 200 OK
Call-ID: 6eddbe93-37a4-4f01-a736-e8b688b05c1f
CSeq: 15359 PRACK
From: <sip:1077@172.18.96.170>;tag=b83d61f0-1ad3-440d-819a-17a22683e9dc
To: <sip:1027@172.18.96.170>;tag=ub2vn9ehal
Via: SIP/2.0/UDP 172.18.96.147:5060;received=172.18.96.147;branch=z9hG4bKPj6f3c7b77-60e0-446c-806e-629f61c59c6f;rport=5060
Content-Length: 0
--end msg--
05:28:47.599 udp0x682e44b8 !Remote RTP address switched to 172.18.96.171:34936
05:28:47.600 udp0x682e44b8 Remote RTCP address switched to predicted address 172.18.96.171:34937
localhost>
localhost>
localhost>
localhost>
localhost>
localhost>
localhost>
localhost>
localhost> 05:28:57.849 pjsua_core.c .RX 843 bytes Response msg 200/INVITE/cseq=15358 (rdata0x64fab1dc) from UDP 172.18.96.170:5060:
SIP/2.0 200 OK
Accept: application/sdp
Allow: INVITE,ACK,CANCEL,BYE,INFO,PRACK,OPTIONS,REGISTER,REFER,SUBSCRIBE,MESSAGE,PUBLISH,UPDATE
Call-ID: 6eddbe93-37a4-4f01-a736-e8b688b05c1f
Contact: "1027_SIP" <sip:1027@172.18.96.170:5060>
CSeq: 15358 INVITE
From: <sip:1077@172.18.96.170>;tag=b83d61f0-1ad3-440d-819a-17a22683e9dc
To: "1027_SIP" <sip:1027@172.18.96.170>;tag=ub2vn9ehal
Supported: 100rel
Via: SIP/2.0/UDP 172.18.96.147:5060;received=172.18.96.147;branch=z9hG4bKPjfd16842b-6e63-4a1b-9f5b-9a4501dcff02;rport=5060
P-Asserted-Identity: "1027_SIP" <sip:1027@172.18.96.170>
Content-Length: 154
Content-Type: application/sdp
Content-Disposition: session;handling=required
v=0
o=- 1832882 3710868 IN IP4 172.18.96.145
s=-
c=IN IP4 172.18.96.145
t=0 0
m=audio 16384 RTP/AVP 8
a=rtpmap:8 PCMA/8000
a=ptime:20
a=sendrecv
--end msg--
05:28:57.852 pjsua_app.c .....Call 0 state changed to CONNECTING
05:28:57.853 pjsua_media.c .....Call 0: updating media..
05:28:57.853 pjsua_aud.c ......Audio channel update..
05:28:57.853 strm0x683058cc .......VAD temporarily disabled
05:28:57.854 strm0x683058cc .......Encoder stream started
05:28:57.854 strm0x683058cc .......Decoder stream started
05:28:57.854 pjsua_media.c ......Audio updated, stream #0: PCMA (sendrecv)
05:28:57.854 pjsua_app.c .....Call 0 media 0 [type=audio], status is Active
05:28:57.854 pjsua_aud.c .....Conf disconnect: 1 -x- 0
05:28:57.854 conference.c ......Port 1 (ringback) stop transmitting to port 0 (Android JNI)
05:28:57.854 pjsua_aud.c .....Conf connect: 3 --> 0
05:28:57.854 conference.c ......Port 3 (sip:1027@172.18.96.170) transmitting to port 0 (Android JNI)
05:28:57.854 pjsua_aud.c .....Conf connect: 0 --> 3
05:28:57.854 conference.c ......Port 0 (Android JNI) transmitting to port 3 (sip:1027@172.18.96.170)
05:28:57.859 Master/sound !::::BLA:::: samples_per_frame=160
05:28:57.859 Master/sound Underflow, buf_cnt=0, will generate 1 frame
05:28:57.864 Master/sound ::::BLA:::: samples_per_frame=160
05:28:57.864 Master/sound Underflow, buf_cnt=0, will generate 1 frame
05:28:57.868 pjsua_core.c !.....TX 357 bytes Request msg ACK/cseq=15358 (tdta0x68308bc0) to UDP 172.18.96.170:5060:
ACK sip:1027@172.18.96.170:5060 SIP/2.0
Via: SIP/2.0/UDP 172.18.96.147:5060;rport;branch=z9hG4bKPjf5c0643d-2088-4fdc-b39e-e186819a60ce
Max-Forwards: 70
From: <sip:1077@172.18.96.170>;tag=b83d61f0-1ad3-440d-819a-17a22683e9dc
To: sip:1027@172.18.96.170;tag=ub2vn9ehal
Call-ID: 6eddbe93-37a4-4f01-a736-e8b688b05c1f
CSeq: 15358 ACK
Content-Length: 0
--end msg--
05:28:57.868 pjsua_app.c .....Call 0 state changed to CONFIRMED
05:28:58.291 Master/sound !samples_per_frame=160
05:28:58.292 Master/sound Underflow, buf_cnt=0, will generate 1 frame
05:28:58.475 strm0x683058cc VAD re-enabled
05:28:58.976 Master/sound samples_per_frame=160
05:28:58.977 Master/sound Underflow, buf_cnt=0, will generate 1 frame
05:29:00.416 sound_port.c EC suspended because of inactivity
05:29:04.015 Master/sound samples_per_frame=160
05:29:04.016 Master/sound Underflow, buf_cnt=0, will generate 1 frame
05:29:07.553 pjsua_core.c .RX 390 bytes Request msg BYE/cseq=777 (rdata0x64fab1dc) from UDP 172.18.96.170:5060:
BYE sip:1077@172.18.96.147:5060;ob SIP/2.0
Call-ID: 6eddbe93-37a4-4f01-a736-e8b688b05c1f
CSeq: 777 BYE
From: "1027_SIP" <sip:1027@172.18.96.170>;tag=ub2vn9ehal
To: <sip:1077@172.18.96.170>;tag=b83d61f0-1ad3-440d-819a-17a22683e9dc
Via: SIP/2.0/UDP 172.18.96.170:5060;branch=z9hG4bK-xfbdg-5dijl
Reason: Q.850;cause=16;text="Normal call clearing"
Max-Forwards: 70
Content-Length: 0
--end msg--
05:29:07.555 pjsua_core.c .......TX 316 bytes Response msg 200/BYE/cseq=777 (tdta0x68b2bf50) to UDP 172.18.96.170:5060:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.18.96.170:5060;received=172.18.96.170;branch=z9hG4bK-xfbdg-5dijl
Call-ID: 6eddbe93-37a4-4f01-a736-e8b688b05c1f
From: "1027_SIP" <sip:1027@172.18.96.170>;tag=ub2vn9ehal
To: <sip:1077@172.18.96.170>;tag=b83d61f0-1ad3-440d-819a-17a22683e9dc
CSeq: 777 BYE
Content-Length: 0
--end msg--
05:29:07.555 pjsua_app.c ......Call 0 is DISCONNECTED [reason=200 (Normal call clearing)]
05:29:07.555 pjsua_app_comm ......
[DISCONNCTD] To: sip:1027@172.18.96.170;tag=ub2vn9ehal
Call time: 00h:00m:09s, 1st res in 1234 ms, conn in 11666ms
#0 audio PCMA @8kHz, sendrecv, peer=172.18.96.171:34936
SRTP status: Not active Crypto-suite:
RX pt=8, last update:00h:00m:04.400s ago
total 0pkt 0B (0B +IP hdr) @avg=0bps/0bps
pkt loss=0 (0.0%), discrd=0 (0.0%), dup=0 (0.0%), reord=0 (0.0%)
(msec) min avg max last dev
loss period: 0.000 0.000 0.000 0.000 0.000
jitter : 0.000 0.000 0.000 0.000 0.000
TX pt=8, ptime=20, last update:never
total 182pkt 29.1KB (36.4KB +IP hdr) @avg=24.0Kbps/30.0Kbps
pkt loss=0 (0.0%), dup=0 (0.0%), reorder=0 (0.0%)
(msec) min avg max last dev
loss period: 0.000 0.000 0.000 0.000 0.000
jitter : 0.000 0.000 0.000 0.000 0.000
RTT msec : 0.000 0.000 0.000 0.000 0.000
05:29:07.557 pjsua_media.c ......Call 0: deinitializing media..
05:29:07.557 pjsua_media.c ........Media stream call00:0 is destroyed
05:29:08.557 pjsua_aud.c Closing sound device after idle for 1 second(s)
05:29:08.557 pjsua_app.c .Turning sound device OFF
05:29:08.557 pjsua_aud.c .Closing Android JNI sound playback device and Android JNI sound capture device
05:29:08.557 android_jni_de .Android JNI stream stopped
05:29:08.557 android_jni_de .Destroying Android JNI stream...
05:29:08.599 android_jni_de !.Audio record released
05:29:08.609 android_jni_de .Audio track released
05:29:08.610 android_jni_de .Android JNI stream destroyed
localhost>
localhost>
Thanks for help.
Best ragards,
Branko
_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@xxxxxxxxxxxxxxx http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org