How to close automatically program after call is disconnected

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

 



You can try:

1. simulate the 'q'+ENTER input, or
2. rewrite console_app_main() to just wait for some kind of 'event
object' fired, 'event object' is triggered by disconnected call, or
3. to be a bit clean (not modifying anything of pjsua), build your own
project with your own main() - (see main.c of pjsua) : call
app_init(), call pjsua_start(), make call, wait for disconnect event
(similar to no.2), then call app_destroy().

Regards,
nanang


On 26/03/2008, Timo Salokas <tinktwice at msn.com> wrote:
>
>  Hi,
> I'm making a program which will make a call to a number given as command
> line parameter. I am making some changes to the pjsua application and was
> wondering what would be the best way to get it to close the program when the
> call is disconnected, without any dialogue or input from user.
>
> I figured that in pjsua_app.c the "on_call_state"-function might be the
> right place to notice when call_info.state == PJSIP_INV_STATE_DISCONNECTED,
> and move on to do a clean exit, but so far i have only succeeded to make the
> program hang and wait for me to press q + enter on my keyboard...
>
> ________________________________
> Connect to the next generation of MSN Messenger  Get it now!
> _______________________________________________
>  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