[pjsip] How to create acc_id without registering on the server

Thomas Plotkowiak plotti at gmx.net
Tue Nov 20 05:39:45 EST 2007

So far I've been using the code provided by the tutorial to create the
acc_id, but since the registration always times out, since there is no
registrar server I would like to initiate it without registration.

/* Register to SIP server by creating SIP account. */
    pjsua_acc_config cfg;
    cfg.id = pj_str("sip:" SIP_USER "@" SIP_DOMAIN);
    cfg.reg_uri = pj_str("sip:" SIP_DOMAIN);
    cfg.cred_count = 1;
    cfg.cred_info[0].realm = pj_str(SIP_DOMAIN);
    cfg.cred_info[0].scheme = pj_str("digest");
    cfg.cred_info[0].username = pj_str(SIP_USER);
    cfg.cred_info[0].data_type = PJSIP_CRED_DATA_PLAIN_PASSWD;
    cfg.cred_info[0].data = pj_str(SIP_PASSWD);

    status = pjsua_acc_add(&cfg, PJ_TRUE, &acc_id);
    if (status != PJ_SUCCESS) error_exit("Error adding account", status);

I know that there is a way of calling:
pj_status_t pjsua_acc_add_local (

pj_bool_t  *is_default*,

But i dont get what the transport id should be..

I am guessing it has to do with the transport I initiate
    /* Add UDP transport. */
    pjsua_transport_config cfg;

    cfg.port = 5060;
    status = pjsua_transport_create(PJSIP_TRANSPORT_UDP, &cfg, NULL);
    if (status != PJ_SUCCESS) error_exit("Error creating transport",

but how to find out its transport id?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20071120/8957f975/attachment.html>

More information about the pjsip mailing list