Hello All,
I think I must be doing something wrong when attempting to create/register
multiple UAs. I am trying to register multiple UAs, but only the first UA
registers successfully. According to my Ethereal trace, the second UA does
not send the REGISTER message. It appears to me that the su_root_run()
might not be handling (or aware of the second UA)?
Here is the sequence of calls to the sofia-sip APIs:
1. su_init();
2. su_home_init(appl->home);
3. appl->root = su_create_root(NULL);
4. su_root_threading(appl->root, 0);
5. appl->nua[mk] = nua_create(appl->root,
ce_SipEventCb,
(nua_magic_t *)&mkData[mk],
NUTAG_URL("sip:192.168.72.191:5061"),
TAG_END());
6. handle = nua_handle(appl->nua[mk],
(nua_magic_t *)&mkData[mk],
NUTAG_URL("sip:[EMAIL PROTECTED]:5060"),
TAG_END());
7. nua_register(handle, TAG_NULL());
8. Here I fork a new process that calls su_root_run(appl->root) in an
infinite while loop.
9. su_root_threading(appl->root, 0);
10. appl->nua[mk] = nua_create(appl->root,
ce_SipEventCb,
(nua_magic_t *)&mkData[mk],
NUTAG_URL("sip:192.168.72.191:5062"),
TAG_END());
11. handle = nua_handle(appl->nua[mk],
(nua_magic_t *)&mkData[mk],
NUTAG_URL("sip:[EMAIL PROTECTED]:5060"),
TAG_END());
12. nua_register(handle, TAG_NULL());
The first UA is reflected in steps 4 - 7, above. The second UA is reflected
in steps 9 - 12, above.
Below are the DEBUG logs from the sofia SIP stack for the second UA only:
nua: nua_create: entering
incref(0x1001f020) by su_task_copy
incref(0x1001f020) by su_clone_start
incref(0x1001f020) by su_clone_start
1024 at su_msg_create locking(0x1001f020)... ...1024 at su_msg_create
locked(0x1001f020)... ...1024 at su_msg_create unlocked(0x1001
f020)
incref(0x1001f020) by su_msg_create
incref(0x1001f020) by su_msg_create
nua: nua_stack_init: entering
incref(0x1001f020) by su_task_copy
nua: nua_stack_set_params: entering
soa_create("default", 0x10022e20, 0x10025208) called
soa_set_params(static::0x10025558, ...) called
nta_agent_create: initialized hash tables
nta_agent_create: initialized transports
nta_agent_create: initialized random identifiers
incref(0x1001f020) by su_task_copy
nta_agent_create: initialized timer
incref(0x1001f020) by su_task_copy
nta_agent_create: initialized resolver
tport_create(): 0x100267e8
incref(0x1001f020) by su_task_copy
nta: master transport created
tport_bind_server(0x100267e8) to */192.168.72.191:5062/sip
tport_bind_server(0x100267e8): calling tport_listen for udp
tport_alloc_primary(0x100267e8): new primary tport 0x10026be0
tport_listen(0x10026be0): listening at udp/192.168.72.191:5062/sip
tport_bind_server(0x100267e8): calling tport_listen for tcp
tport_alloc_primary(0x100267e8): new primary tport 0x10026e78
tport_listen(0x10026e78): listening at tcp/192.168.72.191:5062/sip
nta: bound to (192.168.72.191:5062;transport=*)
nta: agent_init_via: SIP/2.0/udp 192.168.72.191:5062 (sip)
nta: agent_init_via: SIP/2.0/tcp 192.168.72.191:5062 (sip)
nta: Via fields initialized
nta: Contact header created
nua_register: Adding contact URL '192.168.72.191' to list.
incref(0x1001f020) by su_task_copy
nua: nh_create_handle: entering
Returned from nua_handle(): handle=0x100274f0...
ce_AddLine: nua_handle for MK2 SUCCESS
nua: nua_register: entering
1024 at su_msg_create locking(0x1001f020)... ...1024 at su_msg_create
locked(0x1001f020)... ...1024 at su_msg_create unlocked(0x1001
f020)
incref(0x1001f020) by su_msg_create
1024 at su_port_send locking(0x1001f020)... ...1024 at su_port_send
locked(0x1001f020)... ...1024 at su_port_send unlocked(0x1001f02
0)
nta: timer K fired, terminate REGISTER (9624888)
outgoing_reclaim_all((nil), (nil), 0x7f7ffb78)
nta_outgoing_timer: 0/0 resent, 0/0 tout, 1/1 term, 1/1 free
Best Regards,
Jerry
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Sofia-sip-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel