static void set_tp_state_cb()
{
    pjsip_tp_state_callback tpcb;
    pjsip_tpmgr *tpmgr;

    tpmgr = pjsip_endpt_get_tpmgr(pjsua_var.endpt);
    tpcb = pjsip_tpmgr_get_state_cb(tpmgr);

    if (tpcb != &on_tp_state_callback) {
	pjsua_var.old_tp_cb = tpcb;
	pjsip_tpmgr_set_state_cb(tpmgr, &on_tp_state_callback);
    }
}
static void set_tp_state_cb()
{
    pjsip_tp_state_callback tpcb;
    pjsip_tpmgr *tpmgr;

    tpmgr = pjsip_endpt_get_tpmgr(pjsua_var.endpt);
    tpcb = pjsip_tpmgr_get_state_cb(tpmgr);

    if (tpcb != &on_tp_state_callback) {
	pjsua_var.old_tp_cb = tpcb;
	pjsip_tpmgr_set_state_cb(tpmgr, &on_tp_state_callback);
    }
}