Exemple #1
0
def worker_thread_main(arg):
	global C_QUIT
	thread_desc = 0;
	status = py_pjsua.thread_register("python worker", thread_desc)
	if status != 0:
		py_pjsua.perror(THIS_FILE, "Error registering thread", status)
	else:
		while C_QUIT == 0:
			py_pjsua.handle_events(50)
		print "Worker thread quitting.."
		C_QUIT = 2
Exemple #2
0
                                          py_pjsua.verify_sip_url(sipaddr))

sipaddr = '167.205.34.99'
print "checking invalid sip address [%s] : %d" % (
    sipaddr, py_pjsua.verify_sip_url(sipaddr))

object = py_pjsua.get_pjsip_endpt()
print "identitas Endpoint :" + ` object ` + ""

mediaend = py_pjsua.get_pjmedia_endpt()
print "identitas Media Endpoint :" + ` mediaend ` + ""

pool = py_pjsua.get_pool_factory()
print "identitas pool factory :" + ` pool ` + ""

status = py_pjsua.handle_events(3000)
print "py status after 3 second of blocking wait :" + ` status `

# end of new testrun

#

# lib transport
stunc = py_pjsua.stun_config_default()

tc = py_pjsua.transport_config_default()

py_pjsua.normalize_stun_config(stunc)

status, id = py_pjsua.transport_create(1, tc)
print "py transport create status " + ` status `
Exemple #3
0
				py_pjsua.acc_set_registration(g_acc_id, 0)
		elif choice[0] == "d":
			py_pjsua.dump(choice[1] == "d")
		elif choice[0] == "a":
			if g_current_call != py_pjsua.PJSUA_INVALID_ID:				
				
				py_pjsua.call_answer(g_current_call, 200, None, None)
			else:
				print "No current call"


#
# main
#
app_init()
app_start()
app_menu()

#
# Done, quitting..
#
print "PJSUA shutting down.."
C_QUIT = 1
# Give the worker thread chance to quit itself
while C_QUIT != 2:
    py_pjsua.handle_events(50)

print "PJSUA destroying.."
py_pjsua.destroy()

Exemple #4
0
sipaddr = 'sip:167.205.34.99'
print "checking sip address [%s] : %d" % (sipaddr, py_pjsua.verify_sip_url(sipaddr))

sipaddr = '167.205.34.99'
print "checking invalid sip address [%s] : %d" % (sipaddr, py_pjsua.verify_sip_url(sipaddr))

object = py_pjsua.get_pjsip_endpt()
print "identitas Endpoint :" + `object` + ""

mediaend = py_pjsua.get_pjmedia_endpt()
print "identitas Media Endpoint :" + `mediaend` + ""

pool = py_pjsua.get_pool_factory()
print "identitas pool factory :" + `pool` + ""

status = py_pjsua.handle_events(3000)
print "py status after 3 second of blocking wait :" + `status`



# end of new testrun

#

# lib transport
stunc = py_pjsua.stun_config_default();


tc = py_pjsua.transport_config_default();