logo       

Re: Enabling VAD/CNG context based: msg#00391

voip.wengophone.devel

Subject: Re: Enabling VAD/CNG context based

Cantemir Mihu wrote:

Hello,

this is what I did to enable VAD only if the CNG payload was negotiated:

in ph_call_media_start() I changed if (phcfg.vad & 0x80000000)
to
if ((phcfg.vad & 0x80000000) && ca->cng)

Additional, in ph_call_retrieve_payloads() I changed
ca->cng = !eXosip_retrieve_negotiated_specific_payload(ca->did, PH_MEDIA_CN_PT_STR, strlen(PH_MEDIA_CN_PT_STR));
to
ca->cng = (eXosip_retrieve_negotiated_specific_payload(ca->did, PH_MEDIA_CN_PT_STR, strlen(PH_MEDIA_CN_PT_STR)) != -1);

But this should work either way.

What I noticed about CNG, is that in the function ph_generate_comfort_noice(),
ret = audio_stream_get_out_space(stream, &used);
always returns -19952 and thus exits with "IOCTL error" and it does not generate a CNG noise.
What could be the cause and solution of this?


I don't now really.... need to single step through it in GDB


Vadim


On 3/29/06, *Vadim Lebedev * <vadim-bTOqz09H78DQT0dZR+AlfA@xxxxxxxxxxxxxxxx <mailto:vadim-bTOqz09H78DQT0dZR+AlfA@xxxxxxxxxxxxxxxx>> wrote:

Cantemir Mihu wrote:

> Hello,
>
> is it possible to enable VAD/CNG only if CNG was negotiated between
> both parties? If yes, how?
> When I test it now, if I enable VAD/CNG on one side and call another
> who does not support this feature, the first side has VAD
enabled and
> does not send voice packets, which on the other side appears very
> annoying. The first side should disable VAD if CNG payload was not
> negotiated.
>
> Thanks for your help.
>
Normally phApi tries to negotiatie the CNG payload... take a look in
ph_call_retreive_payloads....
but frankly this is note very well tested....

Vadim


> --
> ----
> Best regards / Mit freundlichen Grüssen
> Cantemir Mihu
>
>------------------------------------------------------------------------

>
>_______________________________________________
>Wengophone-devel mailing list
> Wengophone-devel-ZwoEplunGu1JKUZHOYzk1kEOCMrvLtNR@xxxxxxxxxxxxxxxx
<mailto:Wengophone-devel-ZwoEplunGu1JKUZHOYzk1kEOCMrvLtNR@xxxxxxxxxxxxxxxx>
> http://dev.openwengo.com/mailman/listinfo/wengophone-devel
>




--
----
Best regards / Mit freundlichen Grüssen
Cantemir Mihu


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise