Pjsip does not automatically send a re-register and keep alive packets

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

 



I have the following code to register the client on an Android application
using pjsip-jni. The registration succeeds but I don't see neither the keep
alive packet nor the re-registration.
What's wrong?

pjsua_acc_config cfg = new pjsua_acc_config();
pjsua.acc_config_default(cfg); cfg.setPriority(1);
cfg.setId(pjsua.pj_str_copy("sip:" + sipUser + "@" + sipServer)); String
useTCP = Settings.useTCP()?";transport=tcp":"";
cfg.setReg_uri(pjsua.pj_str_copy("sip:" + sipServer+useTCP));
cfg.setUse_rfc5626(pjsuaConstants.PJ_TRUE); //only for tcp/tls ignored with
udp cfg.setKa_interval(20); cfg.setReg_timeout(3600);
cfg.setReg_delay_before_refresh(10); //set transport pjsua_transport_config
cfgTrasport = new pjsua_transport_config();
pjsua.transport_config_default(cfgTrasport); cfgTrasport.setPort(sipPort);
pjsip_transport_type_e transport =
Settings.useTCP()?pjsip_transport_type_e.PJSIP_TRANSPORT_TCP:pjsip_transport_type_e.PJSIP_TRANSPORT_UDP;
int status = pjsua.transport_create(transport, cfgTrasport, tId); //set
credentials cfg.setCred_count(1); pjsip_cred_info cred_info =
cfg.getCred_info(); cred_info.setRealm(pjsua.pj_str_copy(sipServer));
cred_info.setScheme(pjsua.pj_str_copy("Digest"));
cred_info.setUsername(pjsua.pj_str_copy(sipUser));
cred_info.setData_type(pjsip_cred_data_type.PJSIP_CRED_DATA_PLAIN_PASSWD.swigValue());
cred_info.setData(pjsua.pj_str_copy(password)); pjsip_auth_clt_pref
authPref = cfg.getAuth_pref();
authPref.setInitial_auth(pjsuaConstants.PJ_FALSE);
cfg.setAuth_pref(authPref); status = pjsua.acc_add(cfg,
pjsuaConstants.PJ_TRUE, accId);

I found this link:
http://stackoverflow.com/questions/16353653/account-re-registration-in-pjsip

but there isn't an answer.

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20130620/86fadff6/attachment-0001.html>


[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