14:54:30.981 os_core_unix.c !pjlib 2.2.1-svn for POSIX initialized
14:54:30.983 sip_endpoint.c .Creating endpoint instance...
14:54:30.984 pjlib .select() I/O Queue created (0xca1850)
14:54:30.984 sip_endpoint.c .Module "mod-msg-print" registered
14:54:30.984 sip_transport. .Transport manager created.
14:54:30.984 pjsua_core.c .PJSUA state changed: NULL --> CREATED
14:54:30.985 sip_endpoint.c .Module "mod-pjsua-log" registered
14:54:30.985 sip_endpoint.c .Module "mod-tsx-layer" registered
14:54:30.985 sip_endpoint.c .Module "mod-stateful-util" registered
14:54:30.985 sip_endpoint.c .Module "mod-ua" registered
14:54:30.985 sip_endpoint.c .Module "mod-100rel" registered
14:54:30.985 sip_endpoint.c .Module "mod-pjsua" registered
14:54:30.985 sip_endpoint.c .Module "mod-invite" registered
14:54:31.030 alsa_dev.c ..ALSA driver found 17 devices
14:54:31.030 alsa_dev.c ..ALSA initialized
14:54:31.030 pjlib ..select() I/O Queue created (0xcb5968)
14:54:31.035 pjsua_vid.c ..Initializing video subsystem..
14:54:31.155 v4l2_dev.c ...Video4Linux2 has 1 devices
14:54:31.155 colorbar_dev.c ...Colorbar video src initialized with 1 device(s):
14:54:31.155 colorbar_dev.c ... 0: Colorbar generator
Hi Kaushik,
If I understand the problem you have correctly, (please next time post logs/console ouputs leading to your diagnosis of the problem, they can be useful even if you’re 100% sure about the nature of the problem) you should be able to follow the instructions from step 3 in this link to solve your problem.
http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2013-December/016918.html
Hope this is useful,
Gianni
Da: pjsip [mailto:pjsip-bounces@xxxxxxxxxxxxxxx] Per conto di Kaushik Turlapaty
Inviato: martedì 31 maggio 2016 13:48
A: pjsip list <pjsip@xxxxxxxxxxxxxxx>
Oggetto: Re: R: PJSIP call, play music and hangup in python
Hey,
I just figured out the problem is because of ALSA ( I am using Ubuntu 14.04 ). It is because of ALSA that I am not able to get the audio. Can someone help me how to go about the whole ALSA thing to get the audio
Thanks,
Kaushik
On Tue, May 31, 2016 at 2:46 PM, Gianni Massi <g.massi@xxxxxxxxxxxxxxx> wrote:
You might need to put the conf_connect calls in the onMediaState() callback. See if that works.
Gianni
Da: pjsip [mailto:pjsip-bounces@xxxxxxxxxxxxxxx] Per conto di Kaushik Turlapaty
Inviato: martedì 31 maggio 2016 10:57
A: pjsip@xxxxxxxxxxxxxxx
Oggetto: Re: PJSIP call, play music and hangup in python
This is the logic of the goal I am trying to achieve. It should call, when confirmed, should play an audio wav file and hangup after that
I am able to call, but when the call is lift, I cannot hear the audio.
if self.call.info().state == pjsua.CallState.DISCONNECTED:current_call = Noneprint 'Current call is', current_callin_call = Falseelif self.call.info().state == pjsua.CallState.CONFIRMED:#Call is Answred
print "Call Answred"wfile = wave.open("message.wav")time = (1.0 * wfile.getnframes ()) / wfile.getframerate ()print str(time) + "ms"wfile.close()call_slot = self.call.info().conf_slotself.wav_player_id=pjsua.Lib.instance().create_player('message.wav',loop=False)self.wav_slot=pjsua.Lib.instance().player_get_slot(self.wav_player_id)pjsua.Lib.instance().conf_connect(self.wav_slot, call_slot)sleep(time)pjsua.Lib.instance().player_destroy(self.wav_player_id)self.call.hangup()in_call = FalseThis is some part of the log when I run the program
17:03:26.375 pjsua_aud.c .....Creating file player: test.wav..
17:03:26.375 wav_player.c ......File player 'test.wav' created: samp.rate=16000, ch=1, bufsize=4KB, filesize=166KB
17:03:26.375 pjsua_aud.c ......Player created, id=0, slot=2
17:03:26.375 pjsua_aud.c .....Conf connect: 2 --> 1
17:03:26.375 pjsua_aud.c ......Set sound device: capture=-99, playback=-99
17:03:26.376 pjsua_aud.c .......No changes in capture and playback devices
17:03:26.376 conference.c ......Port 2 (test.wav) transmitting to port 1 (sip:***********@*****.*****.com)
17:03:28.141 pjsua_aud.c .....Destroying player 0..
17:03:28.141 pjsua_call.c .....Call 0 hanging up: code=603..
_______________________________________________
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
_______________________________________________
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@xxxxxxxxxxxxxxx http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org