Changed WinCE demo app to automatically answer incoming calls.
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@667 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
parent
2704258752
commit
fd27c6699a
|
@ -1,5 +1,8 @@
|
|||
|
||||
|
||||
//#define PJ_CONFIG_MINIMAL_SIZE
|
||||
//#define PJ_CONFIG_MAXIMUM_SPEED
|
||||
|
||||
|
||||
/*
|
||||
* This file (config_site_sample.h) contains various configuration
|
||||
|
@ -19,12 +22,61 @@
|
|||
# define PJ_HAS_FLOATING_POINT 0
|
||||
|
||||
# define PJMEDIA_HAS_G711_PLC 0
|
||||
# define PJMEDIA_HAS_SMALL_FILTER 0
|
||||
# define PJMEDIA_HAS_SMALL_FILTER 1
|
||||
# define PJMEDIA_HAS_LARGE_FILTER 0
|
||||
# define PJMEDIA_HAS_L16_CODEC 0
|
||||
/*# define PJMEDIA_HAS_GSM_CODEC 0*/
|
||||
# define PJMEDIA_HAS_ILBC_CODEC 0
|
||||
/*# define PJMEDIA_HAS_ILBC_CODEC 0*/
|
||||
/*# define PJMEDIA_HAS_SPEEX_CODEC 0*/
|
||||
# define PJMEDIA_HAS_SPEEX_AEC 0
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Minimum size
|
||||
*/
|
||||
#ifdef PJ_CONFIG_MINIMAL_SIZE
|
||||
|
||||
# undef PJ_OS_HAS_CHECK_STACK
|
||||
# define PJ_OS_HAS_CHECK_STACK 0
|
||||
# define PJ_LOG_MAX_LEVEL 0
|
||||
# define PJ_ENABLE_EXTRA_CHECK 0
|
||||
# define PJ_HAS_ERROR_STRING 0
|
||||
# undef PJ_IOQUEUE_MAX_HANDLES
|
||||
# define PJ_IOQUEUE_MAX_HANDLES 4
|
||||
# define PJSIP_MAX_TSX_COUNT 16
|
||||
# define PJSIP_MAX_DIALOG_COUNT 16
|
||||
# define PJSIP_UDP_SO_SNDBUF_SIZE 4000
|
||||
# define PJSIP_UDP_SO_RCVBUF_SIZE 4000
|
||||
# define PJSIP_AUTH_HEADER_CACHING 0
|
||||
# define PJSIP_AUTH_AUTO_SEND_NEXT 0
|
||||
# define PJSIP_AUTH_QOP_SUPPORT 0
|
||||
# define PJMEDIA_HAS_LARGE_FILTER 0
|
||||
# define PJMEDIA_HAS_SMALL_FILTER 1
|
||||
|
||||
|
||||
#elif defined(PJ_CONFIG_MAXIMUM_SPEED)
|
||||
# define PJ_SCANNER_USE_BITWISE 0
|
||||
# undef PJ_OS_HAS_CHECK_STACK
|
||||
# define PJ_OS_HAS_CHECK_STACK 0
|
||||
# define PJ_LOG_MAX_LEVEL 3
|
||||
# define PJ_ENABLE_EXTRA_CHECK 0
|
||||
# define PJ_IOQUEUE_MAX_HANDLES 5000
|
||||
# define PJSIP_MAX_TSX_COUNT ((640*1024)-1)
|
||||
# define PJSIP_MAX_DIALOG_COUNT ((640*1024)-1)
|
||||
# define PJSIP_UDP_SO_SNDBUF_SIZE (24*1024*1024)
|
||||
# define PJSIP_UDP_SO_RCVBUF_SIZE (24*1024*1024)
|
||||
# define PJ_DEBUG 0
|
||||
# define PJSIP_SAFE_MODULE 0
|
||||
# define PJ_HAS_STRICMP_ALNUM 1
|
||||
# define PJ_HASH_USE_OWN_TOLOWER 1
|
||||
# define PJSIP_UNESCAPE_IN_PLACE 1
|
||||
|
||||
# ifdef PJ_WIN32
|
||||
# define PJSIP_MAX_NET_EVENTS 10
|
||||
# endif
|
||||
|
||||
# define PJSUA_MAX_CALLS 512
|
||||
#endif
|
||||
|
||||
|
|
|
@ -207,7 +207,7 @@ static void on_incoming_call(pjsua_acc_id acc_id, pjsua_call_id call_id,
|
|||
|
||||
SetAction(ID_MENU_ANSWER);
|
||||
SetURI(call_info.remote_info.ptr, call_info.remote_info.slen, false);
|
||||
pjsua_call_answer(call_id, 180, NULL, NULL);
|
||||
pjsua_call_answer(call_id, 200, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
@ -285,6 +285,7 @@ static BOOL OnInitStack(void)
|
|||
/* Setup media */
|
||||
media_cfg.clock_rate = 8000;
|
||||
media_cfg.ec_options = PJMEDIA_ECHO_SIMPLE;
|
||||
media_cfg.ec_tail_len = 256;
|
||||
media_cfg.quality = 1;
|
||||
media_cfg.ptime = 20;
|
||||
|
||||
|
@ -305,12 +306,13 @@ static BOOL OnInitStack(void)
|
|||
}
|
||||
|
||||
/* Set codec priority */
|
||||
pjsua_codec_set_priority(pj_cstr(&tmp, "gsm"), 10);
|
||||
pjsua_codec_set_priority(pj_cstr(&tmp, "pcmu"), 240);
|
||||
pjsua_codec_set_priority(pj_cstr(&tmp, "pcma"), 230);
|
||||
pjsua_codec_set_priority(pj_cstr(&tmp, "speex/8000"), 190);
|
||||
pjsua_codec_set_priority(pj_cstr(&tmp, "ilbc"), 189);
|
||||
pjsua_codec_set_priority(pj_cstr(&tmp, "speex/16000"), 180);
|
||||
pjsua_codec_set_priority(pj_cstr(&tmp, "speex/32000"), 0);
|
||||
pjsua_codec_set_priority(pj_cstr(&tmp, "gsm"), 100);
|
||||
|
||||
|
||||
/* Add UDP transport and the corresponding PJSUA account */
|
||||
|
|
Loading…
Reference in New Issue