[pjsip] Registration with pjsip-lib, pjsip_regc_init

Benny Prijono bennylp at pjsip.org
Thu May 15 14:26:41 EDT 2008

On Thu, May 15, 2008 at 6:10 PM, Damien Herraud <d.herraud at gmail.com> wrote:
> Hi,
>  I try to register on an IMS network (in a LAN) using pjsip-lib (and not
> pjsua, following a discussion I had on this list). I try to use
> pjsip_regc_init function but I don't understand what I have to put in the
> "contact" string in argument.

The contact should contain one or more address where the client is
expecting request to be sent to. Since you're working in a LAN, just
put your listening SIP address/port there, e.g.
"sip:user at 192.x.x.x:5080"

>   I have seen that this is not just a URI thanks to
> pjsua_acc_create_uac_contact source code. But I don't understand what kind
> of contact I have to put in there. Is this a sort of buddy list or do I have
> to also put SIP proxies ?

No, it's just basically the listening address. The
pjsua_acc_create_uac_contact() is more complicated than it should
since it deals with STUN, symmetric NAT, etc.

>  By the way, it is a bit hard to use pjsip-lib to simply register since
> example from simple-pjsua uses a lot of pjsua related code, which seems
> obvious. Is there any pure pjsip-lib example ?

Unfortunately no. But it should be really simple:
 - pjsip_regc_create()
 - pjsip_regc_init()
 - pjsip_regc_set_credentials()
 - pjsip_regc_register()
 - pjsip_regc_send()

and then wait for your callback to be called.


> Cheers,
>  Damien
> _______________________________________________
>  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

More information about the pjsip mailing list