1

Ive build the sample pjsip library for windows phone and successfully registered and made a call.

butproblem is audio is always on speaker phone,not on earpiece ,

can anyone help to make the earpiece the default audio route always ?

Thanks

Shofiqul Alam
  • 585
  • 1
  • 7
  • 29

2 Answers2

1

Access to audio routes is only allowed when a "Windows Voip Call" is active. This is achieved by calling the NotifyCallActive method on the VoipPhoneCall object. The VoipPhoneCall object is returned via a call to the RequestNewOutgoingCall method of the VoipCallCoordinator class. I've tried integrating PJSIP into the Windows Phone 8 voip framework but PJSIP is not able to run in the background process. Still trying to figure that one out.

Houston
  • 426
  • 4
  • 17
  • Houston and Nuno Centeio any luck here, have you all heard or know of any way whatsoever to get the PJSIP audio to route to the normal speaker and not the Speaker Phone speaker for Windows Phone?? Thanks Guys – MattyMerrix Sep 25 '15 at 15:21
  • @MattyMerrix, the answer of Houston is 100% accurate. I have it working. I've started wite ChatterBox VoIP sample for Windows Phone **8.0** and I have PJSip working in the background process. – Nuno Centeio Oct 14 '15 at 14:08
  • I was able to call NotifyCallActive and set the audioroutes accordingly, unfortanately this kills the audio for PJSIP since it is not run in the background process, as far as I knew this want possible yet. @NunoCenteio have you achieved this?? Can you please fill me in, I have been working on this for months? Thanks guys!!! – MattyMerrix Oct 15 '15 at 15:55
0

You can't with the PJSip sample. If you search in pjmedia_audiodev you'll discover a TODO tag. Also, the sample does not manage VoIP calls, therefore you can route to the earpiece.

I hope this helps.

Nuno Centeio
  • 311
  • 3
  • 13
  • so whats the solution then? is there any alternative sip stack available for windows phone 8 which works perfectly? – Shofiqul Alam Jun 22 '14 at 05:48
  • Take a look at Microsoft's ChatterBox VoIP sample. You can use that sample and include PJSip. – Nuno Centeio Jun 23 '14 at 07:32
  • lack of documentation on chatterbox makes it hard to understand everything. The documentation part should have been more brief but nonetheless ill try that. but any headstart on how to include the pjsip into chatterbox example? – Shofiqul Alam Jun 23 '14 at 11:45
  • Houston and Nuno Centeio any luck here, have you all heard or know of any way whatsoever to get the PJSIP audio to route to the normal speaker and not the Speaker Phone speaker for Windows Phone?? Thanks Guys – MattyMerrix Sep 25 '15 at 15:21
  • So looks like full on WinRT support will be coming in release 2.5, due in 4 months. – Houston Oct 14 '15 at 10:14
  • Really @Houston? How do you know? Wonderful information! – Nuno Centeio Oct 14 '15 at 14:05
  • @NunoCenteio I am confused, you said in your comment yesterday, you have PJSIP running in the background process?? Is this true, how did you achieve this? I thought this was not supported. Or are you saying it will work in 2.5 when that is released in 4 months – MattyMerrix Oct 15 '15 at 15:49
  • @MattyMerrix, I have it working. Just grab the ChatterSample and use PJSIP in the BackEnd project (the BackEnd project runs on the background process). – Nuno Centeio Oct 15 '15 at 19:34
  • @NunoCenteio i will try this that actually makes a lot of sense – MattyMerrix Oct 19 '15 at 14:35
  • @NunoCenteio I tried adding PJSIP code inside BackEnd project, I added the reference and make calls to PJSIP from the CallController.cpp class, but this causes the CallController not to work and I get an error "The remote procedure call failed. (Exception from HRESULT: 0x800706BE)" and now I cant call the Windows BackEnd CallController at all. – MattyMerrix Nov 03 '15 at 18:12
  • Also @NunoCenteio here is the RoadMap for PJSIP 2.5 it has some details about upcoming WinRT and Windows 10 full support https://trac.pjsip.org/repos/roadmap – MattyMerrix Nov 03 '15 at 18:13