Holding first call then answering second call for Aps Direct

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

 



Thanks Benny for you reply!

Can you Please tell me how and which function will disconnect the first call
from the sound device....

Also, will the first call automatically connect to the sound device when i
re-invite the first call or this too will be done manually...!

On Tue, May 12, 2009 at 11:28 PM, Benny Prijono <bennylp at teluu.com> wrote:

> On Mon, May 11, 2009 at 7:23 AM, S. M. Nazmul Hasan (Opu) <
> apus29 at gmail.com> wrote:
>
>> Hi Benny/Nanang
>>
>> I have experienced a peculiar problem that was not in previous release but
>> in 1.1 APS Direct release..I am using symbian_ua_gui application with direct
>> APS.
>>
>> I have modified the function like this
>>
>> int symbian_ua_answercall()
>> {
>>     PJ_ASSERT_RETURN (g_call_id != PJSUA_INVALID_ID, PJ_EINVAL);
>>
>>     ////////////////2nd call////////////
>>     if (callCounter() == 2) {
>>         pjsua_call_set_hold(first_call_id, NULL);
>>     }
>>     ////////////////2nd call////////////
>>
>>     return pjsua_call_answer(g_call_id, 200, NULL, NULL);
>> }
>>
>> It hold the first call and answer the second call. But the problem is for
>> the second call X-Lite end can hear voice and no voice in pjsip end.
>>
>> Experiment was like this:
>>
>> 1. call from X-Lite to pjsip
>> 2. call from another X-Lite to pjsip
>>
>> Can anyone please tell me the solution please...
>>
>>
> Hi Nazmul,
>
> As mentioned in the doc, with APS-Direct we loose the audio mixing
> capability. While it may not be obvious, you are potentially creating audio
> mixing situation with your scenario above. Here's what probably happened:
>
> - pjsua_call_set_hold() is called. But this will not immediately hold the
> call (it waits until it receives 200/OK for the re-INVITE).
> - pjsua_call_answer() is called, this will immediately activate the second
> stream. Your on_call_media_state() is called, and typically you will connect
> the stream to audio device
> - your pjsua_conf_connect(call2, 0) would fail (do you check the
> pjsua_conf_connect() return value?), hence you won't hear audio in the
> handset
> - your pjsua_conf_connect(0, call2) could succeed as long as it uses the
> same codec as the first call, that's probably why you hear audio in X-lite.
>
> So the solution, disconnect the first call from the sound device before you
> call pjsua_call_set_hold(). That should work.
>
> cheers
>  Benny
>
>
>
>
>
>
> --
>> S. M. Nazmul Hasan Opu
>> Software Engineer
>> R & D Application
>> Dhaka, Bangladesh
>> Mob: +880 1712 901 764
>>
>> _______________________________________________
>> Visit our blog: http://blog.pjsip.org
>>
>> pjsip mailing list
>> pjsip at lists.pjsip.org
>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>>
>>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>


-- 
S. M. Nazmul Hasan Opu
Software Engineer
R & D Application
Dhaka, Bangladesh
Mob: +880 1712 901 764
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090513/3111eb1c/attachment.html>


[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