Re: Playing a busy sound on call disconnect (iOS)

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

 



Hi Marc

Some ideas.

- First of all, after a call ends, pjsip will by default wait 1 sec before releasing the sound card. After that you should be free to do what you want.

- If you don’t want to wait, try playing the sound using pjsua. There is both a file player and tone player available that you just connect to the conference bridge. Then you can play the sound at any point since it will even mix with an ongoing call.



/Johan

On 13/08/16 01:39, "pjsip on behalf of Marc" <pjsip-bounces@xxxxxxxxxxxxxxx on behalf of marc@xxxxxxxxxxxxxxxxxxxx> wrote:

>Is there any built-in way to play a busy sound effect for a few seconds after call disconnect?
>
>In my case trying to play a sound at call state PJSIP_INV_STATE_DISCONNECTED (checking for call_info->last_status to be 486 (PJSIP_SC_BUSY_HERE)).
>
>The problem is that if I play a sound using AVAudioPlayer, PJSIP will disable the shared audio session of the app in coreaudio_dev.m ca_stream_stop(), [stream->sess setActive:NO error:nil]
>
>This causes our AVAudioPlayer to fail to playback the sound effect we want, with a visible warning printed to the console.
>
>Any ideas before we have to modify PJSIP to not modify a shared resource like AVAudioSession without warning?
>
>Is there a way to properly do this, perhaps a notification when ca_stream_stop() ends so we can restart the AVAudioSession for our purposes?
>
>Thanks
>
>- Marc

________________________________

Este mensaje y sus adjuntos se dirigen exclusivamente a su destinatario, puede contener información privilegiada o confidencial y es para uso exclusivo de la persona o entidad de destino. Si no es usted. el destinatario indicado, queda notificado de que la lectura, utilización, divulgación y/o copia sin autorización puede estar prohibida en virtud de la legislación vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente por esta misma vía y proceda a su destrucción.

The information contained in this transmission is privileged and confidential information intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this transmission in error, do not read it. Please immediately reply to the sender that you have received this communication in error and then delete it.

Esta mensagem e seus anexos se dirigem exclusivamente ao seu destinatário, pode conter informação privilegiada ou confidencial e é para uso exclusivo da pessoa ou entidade de destino. Se não é vossa senhoria o destinatário indicado, fica notificado de que a leitura, utilização, divulgação e/ou cópia sem autorização pode estar proibida em virtude da legislação vigente. Se recebeu esta mensagem por erro, rogamos-lhe que nos o comunique imediatamente por esta mesma via e proceda a sua destruição
_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
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