android - Error while trying registering with pjsip: PJSIP_EUNSUPTRANSPORT -
i'm developing sip client based on pjsip on android (i'm using csipsimple code reference now).
when try register account following error:
unable generate suitable contact header registration: unsupported transport (pjsip_eunsuptransport)
my code same in here sipserver string ip address of registrar "192.168...."
i have tried not specify transport method in following code:
int[] accid = new int[1]; accid[0] = 1; pjsua_acc_config cfg = new pjsua_acc_config(); pjsua.acc_config_default(cfg); csipsimple_acc_config css_cfg = new csipsimple_acc_config(); pjsua.csipsimple_acc_config_default(css_cfg); cfg.setpriority(10); cfg.setid(pjsua.pj_str_copy("sip:" + sipuser + "@" + sipserver)); cfg.setreg_uri(pjsua.pj_str_copy("sip:" + sipserver)); cfg.setreg_timeout(60); cfg.setcred_count(1); cfg.setpublish_enabled(0); cfg.setreg_delay_before_refresh(-1); cfg.setuse_timer(pjsua_sip_timer_use.pjsua_sip_timer_optional); pjsua.csipsimple_set_acc_user_data(cfg, css_cfg); status = pjsua.acc_add(cfg, pjsuaconstants.pj_false, accid); the error is:
e/libpjsip(20934): pjsua_acc.c ..unable generate suitable contact header registration: unsupported transport (pjsip_eunsuptransport) [status=171060]
of course after there no trace on wireshark: lib gives before sending data.
thanks
i had add following code:
int[] tid = new int[1]; int status; pjsua.transport_config_default(cfgtrasport); cfgtrasport.setport(5060); status = pjsua.transport_create(pjsip_transport_type_e.pjsip_transport_udp, cfgtrasport, tid); if (status != pjsuaconstants.pj_success) { log.e("pjsua.transport_create returned status="+status); }
Comments
Post a Comment