Python Check registration status PJSIP/PJSUA

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

 



Following registration.py and call.py examples
 here 
I have developed my SIP client that works quite well.
(case 1)when i check a right host the status respond quickly whether the status 200 OK or 401 Unauthorized. (case 2 ) and when the host was wrong it takes more time to respond and show the response massage that "status= 408 (Request Timeout)" it takes more than 30 second .
how i can edit the time that take to show respond massage in case 2 ? it's mean how i can Reduce this 30 second to show the respond massage ?
This is the registration code:
    lib.init(log_cfg = pj.LogConfig(level=1, callback=log_cb))
    lib.create_transport(pj.TransportType.UDP, pj.TransportConfig(5080))
    lib.start()

    acc_cfg = pj.AccountConfig()
    acc_cfg.id = "sip:1001@10.20.3.1:5060"
    acc_cfg.reg_uri = "sip:10.20.3.1:5060"
    acc_cfg.proxy = [ "sip:10.20.3.1:5060" ]
    acc_cfg.auth_cred = [ pj.AuthCred("*", "1001", "5050") ]

    acc = lib.create_account(acc_cfg)
    acc_cb = MyAccountCallback(acc)
    acc.set_callback(acc_cb)
    acc_cb.wait()
    print "\n"
    print "Registration complete, status=", acc.info().reg_status, \
      "(" + acc.info

_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
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