Hi, Have you tried to add/create multiple accounts? This way, the stack will automatically manage the transports (client) for all accounts. BR, nanang 2010/4/14 ?? <welizhi at gmail.com>: > > > ---------- Forwarded message ---------- > From: ?? <welizhi@xxxxxxxxx> > Date: 2010/4/13 > Subject: How can I instantiate multiple PJSIP stacks in my application? > To: pjsip-owner at lists.pjsip.org > > > I need to register multiple sip-server by the transport of tcp, but i found > that it can't build transport, > > the code : > > pjsip_tcp_transport_start2() > > pj_status_t pjsip_tpmgr_register_tpfactory( pjsip_tpmgr *mgr, > pjsip_tpfactory *tpf) > { > pjsip_tpfactory *p; > pj_status_t status; > > pj_lock_acquire(mgr->lock); > > /* Check that no factory with the same type has been registered. */ > status = PJ_SUCCESS; > for (p=mgr->factory_list.next; p!=&mgr->factory_list; p=p->next) { > if (p->type == tpf->type) { > status = PJSIP_ETYPEEXISTS; > break; > } > if (p == tpf) { > status = PJ_EEXISTS; > break; > } > } > > if (status != PJ_SUCCESS) { > pj_lock_release(mgr->lock); > return status; > } > > pj_list_insert_before(&mgr->factory_list, tpf); > > pj_lock_release(mgr->lock); > > return PJ_SUCCESS; > } > > the module is only one, for example, invite_mod, transaction_mod. > > i want to make the transport to multiple sip-server , isn't pjsip support ? > > How can i do, Thanks. > > Best regards. > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > >