[pjsip] URGENT - pjsip 2.1 - audio playback, audio capture do not work at all its being 4 weeks now any advise on this please?

Shamun Toha Md shamun at companysocia.com
Tue Dec 3 07:34:32 EST 2013


Hello *Gaurav, Varun, Dennis, Nishant*

Can you please tell me why after installing pjsip 2.1 perfectly, with
libasound2 and all , i still do not have audio playback? (i checked with
speaker-test, alsa sink, src mplayer, vlc, ffmpeg my speaker and mic is
available without pjsip it works, but with pjsip i still do not hear any
single audio playback, also when i am connected i have no microphone
capture)

Please can you kindly share, i have been trying this for about now 4 weeks,
still its not working at all.

Please see the details of following steps how i installed it and how i
tested it.

*Step 1*: install and run

$ cd /var/tmp
$ wget http://www.pjsip.org/release/2.1/pjproject-2.1.tar.bz2
$ tar xvfj pjproject-2.1.tar.bz2
$ cd pjproject-2.1
$ ./configure
$ make dep && make && make install


# Python enable (optional)
$ cd /var/tmp/pjproject-2.1.0/pjsip-apps/src/python
$ python setup.py install
$ python
Python 2.7.5+ (default, Sep 19 2013, 13:48:49)
[GCC 4.8.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pjsua
>>>


*Step 2*: Basic kick start sample to register and make call, by manually
assigning playback id and capture id , this also do not work for audio
capture and playback: https://gist.github.com/anonymous/7768285

Here you can see i used the latest release built in pjsua which also giving
no sound and no luck to capture microphone.

$ ./pjsua-x86_64-unknown-linux-gnu
13:24:33.632 os_core_unix.c !pjlib 2.1 for POSIX initialized
13:24:33.632 sip_endpoint.c  .Creating endpoint instance...
13:24:33.633          pjlib  .select() I/O Queue created (0x20fb8a0)
13:24:33.633 sip_endpoint.c  .Module "mod-msg-print" registered
13:24:33.633 sip_transport.  .Transport manager created.
13:24:33.633   pjsua_core.c  .PJSUA state changed: NULL --> CREATED
13:24:33.633 sip_endpoint.c  .Module "mod-pjsua-log" registered
13:24:33.633 sip_endpoint.c  .Module "mod-tsx-layer" registered
13:24:33.633 sip_endpoint.c  .Module "mod-stateful-util" registered
13:24:33.633 sip_endpoint.c  .Module "mod-ua" registered
13:24:33.633 sip_endpoint.c  .Module "mod-100rel" registered
13:24:33.633 sip_endpoint.c  .Module "mod-pjsua" registered
13:24:33.633 sip_endpoint.c  .Module "mod-invite" registered
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
13:24:33.702       pa_dev.c  ..PortAudio sound library initialized, status=0
13:24:33.702       pa_dev.c  ..PortAudio host api count=2
13:24:33.702       pa_dev.c  ..Sound device count=20
13:24:33.702          pjlib  ..select() I/O Queue created (0x21579f8)
13:24:33.711 sip_endpoint.c  .Module "mod-evsub" registered
13:24:33.711 sip_endpoint.c  .Module "mod-presence" registered
13:24:33.711 sip_endpoint.c  .Module "mod-mwi" registered
13:24:33.711 sip_endpoint.c  .Module "mod-refer" registered
13:24:33.711 sip_endpoint.c  .Module "mod-pjsua-pres" registered
13:24:33.711 sip_endpoint.c  .Module "mod-pjsua-im" registered
13:24:33.711 sip_endpoint.c  .Module "mod-pjsua-options" registered
13:24:33.711   pjsua_core.c  .1 SIP worker threads created
13:24:33.711   pjsua_core.c  .pjsua version 2.1 for Linux-3.11.0.12/x86_64/
glibc-2.17 initialized
13:24:33.711   pjsua_core.c  .PJSUA state changed: CREATED --> INIT
13:24:33.711 sip_endpoint.c  Module "mod-default-handler" registered
13:24:33.711   pjsua_core.c  bind() error: Address already in use [status=
120098]
13:24:33.711   pjsua_core.c  Shutting down, flags=0...
13:24:33.711   pjsua_core.c  PJSUA state changed: INIT --> CLOSING
13:24:33.721   pjsua_call.c  .Hangup all calls..
13:24:33.721   pjsua_pres.c  .Shutting down presence..
13:24:33.721  pjsua_media.c  .Shutting down media..
13:24:33.721  pjsua_media.c  ..Call 0: deinitializing media..
13:24:33.721  pjsua_media.c  ..Call 1: deinitializing media..
13:24:33.721  pjsua_media.c  ..Call 2: deinitializing media..
13:24:33.721  pjsua_media.c  ..Call 3: deinitializing media..
13:24:34.203       pa_dev.c  ..PortAudio sound library shutting down..
13:24:35.210   pjsua_core.c  .Destroying...
13:24:35.210 sip_transactio  .Stopping transaction layer module
13:24:35.210 sip_transactio  .Stopped transaction layer module
13:24:35.210 sip_endpoint.c  .Module "mod-default-handler" unregistered
13:24:35.210 sip_endpoint.c  .Module "mod-pjsua-options" unregistered
13:24:35.210 sip_endpoint.c  .Module "mod-pjsua-im" unregistered
13:24:35.210 sip_endpoint.c  .Module "mod-pjsua-pres" unregistered
13:24:35.210 sip_endpoint.c  .Module "mod-pjsua" unregistered
13:24:35.210 sip_endpoint.c  .Module "mod-stateful-util" unregistered
13:24:35.210 sip_endpoint.c  .Module "mod-refer" unregistered
13:24:35.210 sip_endpoint.c  .Module "mod-mwi" unregistered
13:24:35.210 sip_endpoint.c  .Module "mod-presence" unregistered
13:24:35.210 sip_endpoint.c  .Module "mod-evsub" unregistered
13:24:35.210 sip_endpoint.c  .Module "mod-invite" unregistered
13:24:35.210 sip_endpoint.c  .Module "mod-100rel" unregistered
13:24:35.210 sip_endpoint.c  .Module "mod-ua" unregistered
13:24:35.210 sip_transactio  .Transaction layer module destroyed
13:24:35.210 sip_endpoint.c  .Module "mod-tsx-layer" unregistered
13:24:35.210 sip_endpoint.c  .Module "mod-msg-print" unregistered
13:24:35.211 sip_endpoint.c  .Module "mod-pjsua-log" unregistered
13:24:35.211 sip_endpoint.c  .Endpoint 0x20f0b08 destroyed
13:24:35.211   pjsua_core.c  .PJSUA state changed: CLOSING --> NULL
13:24:35.211   pjsua_core.c  .PJSUA destroyed...
sun at sun-Alienware-X51:/var/tmp/pjproject-2.1.0/pjsip-apps/bin$ ./pjsua-
x86_64-unknown-linux-gnu
13:24:51.994 os_core_unix.c !pjlib 2.1 for POSIX initialized
13:24:51.995 sip_endpoint.c  .Creating endpoint instance...
13:24:51.995          pjlib  .select() I/O Queue created (0x9d98a0)
13:24:51.995 sip_endpoint.c  .Module "mod-msg-print" registered
13:24:51.995 sip_transport.  .Transport manager created.
13:24:51.995   pjsua_core.c  .PJSUA state changed: NULL --> CREATED
13:24:51.995 sip_endpoint.c  .Module "mod-pjsua-log" registered
13:24:51.995 sip_endpoint.c  .Module "mod-tsx-layer" registered
13:24:51.995 sip_endpoint.c  .Module "mod-stateful-util" registered
13:24:51.995 sip_endpoint.c  .Module "mod-ua" registered
13:24:51.995 sip_endpoint.c  .Module "mod-100rel" registered
13:24:51.995 sip_endpoint.c  .Module "mod-pjsua" registered
13:24:51.995 sip_endpoint.c  .Module "mod-invite" registered
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
13:24:52.013       pa_dev.c  ..PortAudio sound library initialized, status=0
13:24:52.013       pa_dev.c  ..PortAudio host api count=2
13:24:52.013       pa_dev.c  ..Sound device count=20
13:24:52.013          pjlib  ..select() I/O Queue created (0xa359f8)
13:24:52.016 sip_endpoint.c  .Module "mod-evsub" registered
13:24:52.016 sip_endpoint.c  .Module "mod-presence" registered
13:24:52.017 sip_endpoint.c  .Module "mod-mwi" registered
13:24:52.017 sip_endpoint.c  .Module "mod-refer" registered
13:24:52.017 sip_endpoint.c  .Module "mod-pjsua-pres" registered
13:24:52.017 sip_endpoint.c  .Module "mod-pjsua-im" registered
13:24:52.017 sip_endpoint.c  .Module "mod-pjsua-options" registered
13:24:52.017   pjsua_core.c  .1 SIP worker threads created
13:24:52.017   pjsua_core.c  .pjsua version 2.1 for Linux-3.11.0.12/x86_64/
glibc-2.17 initialized
13:24:52.017   pjsua_core.c  .PJSUA state changed: CREATED --> INIT
13:24:52.017 sip_endpoint.c  Module "mod-default-handler" registered
13:24:52.017   pjsua_core.c  SIP UDP socket reachable at 192.168.1.19:5060
13:24:52.017    udp0xa4e6e0  SIP UDP transport started, published address is
 192.168.1.19:5060
13:24:52.017    pjsua_acc.c  Adding account: id=<sip:192.168.1.19:5060>
13:24:52.017    pjsua_acc.c  .Account <sip:192.168.1.19:5060> added with id
0
13:24:52.017    pjsua_acc.c  Acc 0: setting online status to 1..
13:24:52.017    tcplis:5060  SIP TCP listener ready for incoming
connections at 192.168.1.19:5060
13:24:52.017    pjsua_acc.c  Adding account: id=<sip:192.168.1.19:5060;
transport=TCP>
13:24:52.017    pjsua_acc.c  .Account <sip:192.168.1.19:5060;transport=TCP>
 added with id 1
13:24:52.017    pjsua_acc.c  Acc 1: setting online status to 1..
13:24:52.017   pjsua_core.c  PJSUA state changed: INIT --> STARTING
13:24:52.017 sip_endpoint.c  .Module "mod-unsolicited-mwi" registered
13:24:52.017   pjsua_core.c  .PJSUA state changed: STARTING --> RUNNING
>>>>
Account list:
  [ 0] <sip:192.168.1.19:5060>: does not register
       Online status: Online
 *[ 1] <sip:192.168.1.19: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     |
  |
+-----------------------------------------------------------------------------+
|  q  QUIT   L  ReLoad   sleep MS   echo [0|1|txt]     n: detect NAT type
  |
+=============================================================================+
You have 0 active call




>>> 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:9198 at 192.168.1.12
13:25:48.064   pjsua_call.c  Making call with acc #1 to
sip:9198 at 192.168.1.12
13:25:48.065    pjsua_aud.c  .Set sound device: capture=-1, playback=-2
13:25:48.065    pjsua_app.c  ..Turning sound device ON
13:25:48.065    pjsua_aud.c  ..Opening sound device PCM at 16000/1/20ms
Expression 'SetApproximateSampleRate( pcm, hwParams, sr )' failed in
'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1294
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->capture,
inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in
'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1870
Expression 'PaAlsaStream_Configure( stream, inputParameters,
outputParameters, sampleRate, framesPerBuffer, &inputLatency,
&outputLatency, &hostBufferSizeMode )' failed in
'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1994
Expression 'SetApproximateSampleRate( pcm, hwParams, sr )' failed in
'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1294
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->capture,
inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in
'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1870
Expression 'PaAlsaStream_Configure( stream, inputParameters,
outputParameters, sampleRate, framesPerBuffer, &inputLatency,
&outputLatency, &hostBufferSizeMode )' failed in
'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1994
13:25:48.065    pjsua_app.c  ..Turning sound device ON
13:25:48.065    pjsua_aud.c  ..Opening sound device PCM at 44100/1/20ms
13:25:48.122     ec0x9fec00  ...AEC created, clock_rate=44100,
channel=1, samples
per frame=882, tail length=200 ms, latency=100 ms
13:25:48.123  pjsua_media.c  .Call 0: initializing media..
13:25:48.123  pjsua_media.c  ..RTP socket reachable at 192.168.1.19:40000
13:25:48.123  pjsua_media.c  ..RTCP socket reachable at 192.168.1.19:40001
13:25:48.123  pjsua_media.c  ..Media index 0 selected for audio call 0
13:25:48.123   pjsua_core.c  ....TX 1107 bytes Request msg INVITE/cseq=18614
 (tdta0xadcbd0) to UDP 192.168.1.12:5060:
INVITE sip:9198 at 192.168.1.12 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.19:5060;rport;branch=
z9hG4bKPjRpOevqpjWxD1o56Mw8kLUSAzT2RGX6ig
Max-Forwards: 70
From: <sip:192.168.1.19>;tag=gQIWxs6E2ySbCbJ-hFrofB0SCHJwCMma
To: sip:9198 at 192.168.1.12
Contact: <sip:192.168.1.19:5060;ob>
Call-ID: aFBwgwgOw6gqiLvBJ4SFY73qJsqCxc7D
CSeq: 18614 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.1 Linux-3.11.0.12/x86_64/glibc-2.17
Content-Type: application/sdp
Content-Length:   475


v=0
o=- 3595062348 3595062348 IN IP4 192.168.1.19
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 40000 RTP/AVP 98 97 99 104 3 0 8 9 96
c=IN IP4 192.168.1.19
b=TIAS:64000
a=rtcp:40001 IN IP4 192.168.1.19
a=sendrecv
a=rtpmap:98 speex/16000
a=rtpmap:97 speex/8000
a=rtpmap:99 speex/32000
a=rtpmap:104 iLBC/8000
a=fmtp:104 mode=30
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-15


--end msg--
13:25:48.123    pjsua_app.c  .......Call 0 state changed to CALLING
>>> 13:25:48.124   pjsua_core.c  .RX 365 bytes Response msg 100/INVITE/cseq=
18614 (rdata0xa4fd48) from UDP 192.168.1.12:5060:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.19:5060;rport=5060;branch=
z9hG4bKPjRpOevqpjWxD1o56Mw8kLUSAzT2RGX6ig
From: <sip:192.168.1.19>;tag=gQIWxs6E2ySbCbJ-hFrofB0SCHJwCMma
To: <sip:9198 at 192.168.1.12>
Call-ID: aFBwgwgOw6gqiLvBJ4SFY73qJsqCxc7D
CSeq: 18614 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.5.5b+git~20130823T195449Z~863e6cfa3f
Content-Length: 0




--end msg--
13:25:48.144 os_core_unix.c  Info: possibly re-registering existing thread
13:25:48.145   pjsua_core.c  .RX 882 bytes Response msg 407/INVITE/cseq=
18614 (rdata0x7f5b40002998) from UDP 192.168.1.12:5060:
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 192.168.1.19:5060;rport=5060;branch=
z9hG4bKPjRpOevqpjWxD1o56Mw8kLUSAzT2RGX6ig
From: <sip:192.168.1.19>;tag=gQIWxs6E2ySbCbJ-hFrofB0SCHJwCMma
To: <sip:9198 at 192.168.1.12>;tag=DZ4am8m4t08Xr
Call-ID: aFBwgwgOw6gqiLvBJ4SFY73qJsqCxc7D
CSeq: 18614 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.5.5b+git~20130823T195449Z~863e6cfa3f
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER,
 REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, precondition, path, replaces
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog,
 line-seize, call-info, sla, include-session-description, presence.winfo,
 message-summary, refer
Proxy-Authenticate: Digest realm="192.168.1.19", nonce=
"db2a6c3c-5c29-11e3-a388-3586b66a1730", algorithm=MD5, qop="auth"
Content-Length: 0




--end msg--
13:25:48.145   pjsua_core.c  ..TX 334 bytes Request msg ACK/cseq=18614 (
tdta0x7f5b400008c0) to UDP 192.168.1.12:5060:
ACK sip:9198 at 192.168.1.12 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.19:5060;rport;branch=
z9hG4bKPjRpOevqpjWxD1o56Mw8kLUSAzT2RGX6ig
Max-Forwards: 70
From: <sip:192.168.1.19>;tag=gQIWxs6E2ySbCbJ-hFrofB0SCHJwCMma
To: sip:9198 at 192.168.1.12;tag=DZ4am8m4t08Xr
Call-ID: aFBwgwgOw6gqiLvBJ4SFY73qJsqCxc7D
CSeq: 18614 ACK
Content-Length:  0




--end msg--
13:25:48.145 sip_auth_clien  ....Unable to set auth for tdta0xadcbd0: can
not find credential for 192.168.1.19/Digest
13:25:48.145    pjsua_app.c  .....Call 0 is DISCONNECTED [reason=407 (Proxy
Authentication Required)]
13:25:48.145    pjsua_app.c  .....
  [DISCONNCTD] To: sip:9198 at 192.168.1.12
    Call time: 00h:00m:00s, 1st res in 23 ms, conn in 0ms
13:25:48.145  pjsua_media.c  .....Call 0: deinitializing media..
13:25:49.146    pjsua_aud.c !Closing sound device after idle for 1 second(s)
13:25:49.146    pjsua_app.c  .Turning sound device OFF
13:25:49.146    pjsua_aud.c  .Closing HDA Intel PCH: ALC892 Analog
(hw:0,0) sound
playback device and HDA Intel PCH: ALC892 Analog (hw:0,0) sound capture
device




q
13:26:32.391   pjsua_core.c !Shutting down, flags=0...
13:26:32.391   pjsua_core.c  PJSUA state changed: RUNNING --> CLOSING
13:26:32.396   pjsua_call.c  .Hangup all calls..
13:26:32.396   pjsua_pres.c  .Shutting down presence..
13:26:32.396  pjsua_media.c  .Shutting down media..
13:26:32.396  pjsua_media.c  ..Call 0: deinitializing media..
13:26:32.396  pjsua_media.c  ..Call 1: deinitializing media..
13:26:32.396  pjsua_media.c  ..Call 2: deinitializing media..
13:26:32.396  pjsua_media.c  ..Call 3: deinitializing media..
13:26:32.524       pa_dev.c  ..PortAudio sound library shutting down..
13:26:33.532   pjsua_core.c  .Destroying...
13:26:33.532 sip_transactio  .Stopping transaction layer module
13:26:33.532 sip_transactio  .Stopped transaction layer module
13:26:33.532 sip_endpoint.c  .Module "mod-default-handler" unregistered
13:26:33.532 sip_endpoint.c  .Module "mod-unsolicited-mwi" unregistered
13:26:33.532 sip_endpoint.c  .Module "mod-pjsua-options" unregistered
13:26:33.532 sip_endpoint.c  .Module "mod-pjsua-im" unregistered
13:26:33.532 sip_endpoint.c  .Module "mod-pjsua-pres" unregistered
13:26:33.532 sip_endpoint.c  .Module "mod-pjsua" unregistered
13:26:33.532 sip_endpoint.c  .Module "mod-stateful-util" unregistered
13:26:33.532 sip_endpoint.c  .Module "mod-refer" unregistered
13:26:33.532 sip_endpoint.c  .Module "mod-mwi" unregistered
13:26:33.532 sip_endpoint.c  .Module "mod-presence" unregistered
13:26:33.532 sip_endpoint.c  .Module "mod-evsub" unregistered
13:26:33.532 sip_endpoint.c  .Module "mod-invite" unregistered
13:26:33.532 sip_endpoint.c  .Module "mod-100rel" unregistered
13:26:33.532 sip_endpoint.c  .Module "mod-ua" unregistered
13:26:33.532 sip_transactio  .Transaction layer module destroyed
13:26:33.532 sip_endpoint.c  .Module "mod-tsx-layer" unregistered
13:26:33.532 sip_endpoint.c  .Module "mod-msg-print" unregistered
13:26:33.532 sip_endpoint.c  .Module "mod-pjsua-log" unregistered
13:26:33.533    tcplis:5060  .SIP TCP listener destroyed
13:26:33.533 sip_endpoint.c  .Endpoint 0x9ceb08 destroyed
13:26:33.533   pjsua_core.c  .PJSUA state changed: CLOSING --> NULL
13:26:33.533   pjsua_core.c  .PJSUA destroyed...







Thank you
Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20131203/0e85993e/attachment-0001.html>


More information about the pjsip mailing list