Play wave to caller (clock rate?)

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

 



Hi,

Try pjmedia_conf_get_port_info() for the destination port.

Are you using VAS-Direct? And which codec was being used by the call stream?

BR,
nanang


On Wed, Oct 13, 2010 at 2:11 PM, Tine Ur?i? <tine at cde.si> wrote:
> Hi.
>
> I'm having a bit of trouble with playing a wave audio file to caller while
> "on hold".
>
> The error returned by pjsua_conf_connect is "220161" (Incompatible clock
> rate - PJMEDIA_ENCCLOCKRATE).
> The manual states: "WAV player port supports for reading WAV file with
> uncompressed 16 bit PCM format or compressed G.711 A-law/U-law format.".
> I've tried a lot of different wave formats (including 16bit 8khz standard)
> and I can't seem to find the right wave settings.
> If I connect player to the local speaker it works just fine (example:
> pjsua_conf_connect(pjsua_player_get_conf_port(player_id), 0); ).
>
> I'm using pjsip v1.6 on a symbian S60 device (VAS).
>
> How can I find which clock rate to use?
>
> Here's my sample code:
>
> ??? pj_status_t status ;
> ??? pjsua_call_info???? CallDetails ;
> ??? pjsua_player_id???? player_id;
>
> ??? if (pjsua_call_get_info(CallID, &CallDetails) == PJ_SUCCESS)
> ??? {
> ??? ??? //disconnect caller
> ??? ??? pjsua_conf_disconnect(CallDetails.conf_slot, 0) ;
> ??? ??? pjsua_conf_disconnect(0, CallDetails.conf_slot) ;
>
> ??? ??? //create player
> ??? ??? pj_str_t awav = pj_str ("C:\\Data\\OnHold.wav");
> ??? ??? status = pjsua_player_create(&awav, 0, &player_id);
> ??? ??? if (status != PJ_SUCCESS)
> ??? ??? {
> ??? ??? ??? status =
> pjsua_conf_connect(pjsua_player_get_conf_port(player_id),
> CallDetails.conf_slot);
> ??? ??? ??? ...
> ??? ??? }
>
> ??? }
>
>
>
> _______________________________________________
> 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
>
>



[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