Registration with pjsip-lib, pjsip_regc_init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You were totally right again. Sorry I panicked !!!

Now I get all basic registration functions working, but the callback doesn't
seem to be called so I have no way to watch the registration status. I
thought the callback was automatically called with pjsip_regc_create().

Is there something to do to call it ? You can find my ugly source code
attached.


Cheers,

Damien



On Thu, May 22, 2008 at 4:05 AM, Benny Prijono <bennylp at pjsip.org> wrote:

> On Wed, May 21, 2008 at 11:40 PM, Damien Herraud <d.herraud at gmail.com>
> wrote:
> > Hi,
> >
> >  I have a problem with pjsip_regc_register. I get :
> >
> >> ../src/pjsip-ua/sip_reg.c:239: pjsip_regc_init: Assertion `regc &&
> srv_url
> >> && from_url && to_url && contact_cnt && contact && expires' failed.
> >
> > when I launch my program.
> >
>
> That assertion of course means that one (or more) of the listed
> variables/parameters is zero or NULL. I suspect it's
> acc->cfg.reg_timeout, since you didn't initialize this value.
> According to the API, you should set this argument to
> PJSIP_REGC_EXPIRATION_NOT_SPECIFIED if you don't want to specify
> expiration.
>
> >
> > It is driving me crazy since I am sure it has worked before
> (pjsip_regc_send
> > also worked, I mean I got no error. I was getting into regc_cb() code
> when I
> > got this error).
> > I tried to use many saves  but I still get this error !!!
> >
>
> Since the acc->cfg.reg_timeout is not initialized it may contain any
> value. It could be that last time it contains a garbage non-zero value
> hence it passed the assertion.
>
> Cheers
>  Benny
>
>
> > You can find my source code (very simple modification of simpleua.c and
> > util.h) attached !
> >
> >
> > Cheers,
> >
> > Damien
> >
> >
> > On Wed, May 21, 2008 at 7:01 AM, Benny Prijono <bennylp at pjsip.org>
> wrote:
> >>
> >> On Tue, May 20, 2008 at 11:39 PM, Damien Herraud <d.herraud at gmail.com>
> >> wrote:
> >> > Ok ! I am indeed using version 0.8.
> >> >
> >> > Do you advise me to use svn version instead ?
> >> >
> >> >
> >>
> >> No, I didn't and won't advise you to use svn version just because 0.8
> >> lacks pj_sockaddr_get_addr() function. You could use other ways to
> >> retrieve IP address from a socket address, please see <pj/sock.h> for
> >> more info.
> >>
> >> Cheers
> >>  Benny
> >>
> >>
> >> > Damien
> >> >
> >> >
> >> >
> >> > On Sat, May 17, 2008 at 6:27 AM, Benny Prijono <bennylp at pjsip.org>
> >> > wrote:
> >> >>
> >> >> On Fri, May 16, 2008 at 5:28 PM, Damien Herraud <d.herraud at gmail.com
> >
> >> >> wrote:
> >> >> > Thanks for that, I get my address !
> >> >> >
> >> >> > By the way when I was trying getting my address with another
> method,
> >> >> > I
> >> >> > tried
> >> >> > to use pj_sockaddr_get_addr() function defined here . I got an
> error
> >> >> > in
> >> >> > compilation, saying that this is not declared. I searched PJSIP
> >> >> > project
> >> >> > for
> >> >> > this function with eclipse and I could not find it.
> >> >> >
> >> >>
> >> >> This only exists in SVN version, not in 0.8 release version. Perhaps
> >> >> you're using 0.8?
> >> >>
> >> >> Cheers
> >> >>  Benny
> >> >>
> >> >> > 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
> >> >
> >> >
> >> > _______________________________________________
> >> > 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
> >> >
> >> >
> >>
> >> _______________________________________________
> >> 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
> >
> >
> > _______________________________________________
> > 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
> >
> >
>
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080522/48d77c05/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.c
Type: text/x-csrc
Size: 19752 bytes
Desc: not available
Url : http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080522/48d77c05/attachment-0002.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: util.h
Type: text/x-chdr
Size: 9922 bytes
Desc: not available
Url : http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080522/48d77c05/attachment-0003.bin 


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux