Increasing CSEQ in im_callback when proxy authentication is required‏

RM
Rafael Maia
Mon, Sep 28, 2009 9:55 PM

Hi,
i encountered a problem regarding SIP MESSAGE.

When using pjsua, if the server responds with 401 authorization required or 407 proxy authorization required, the CSEQ should be incremented has described in the SIP RFC 3261, page 145. Chapters 22.2 and 22.3.

Just in case anyone else needs this, here is my solution...

file: pjsua_im.c
line: 379

if (status == PJ_SUCCESS) {
pjsua_im_data *im_data2;

// My code
/* Increment CSeq /
pjsip_cseq_hdr cseq_hdr = PJSIP_MSG_CSEQ_HDR(tsx->last_tx);
pj_uint32_t cseq = ++cseq_hdr->cseq;
cseq_hdr = PJSIP_MSG_CSEQ_HDR(tdata->msg);
cseq_hdr->cseq = cseq;
//
** My code

Rafael Maia


Conheça os novos produtos Windows Live! Clique aqui.
http://www.windowslive.com.br

Hi, i encountered a problem regarding SIP MESSAGE. When using pjsua, if the server responds with 401 authorization required or 407 proxy authorization required, the CSEQ should be incremented has described in the SIP RFC 3261, page 145. Chapters 22.2 and 22.3. Just in case anyone else needs this, here is my solution... file: pjsua_im.c line: 379 if (status == PJ_SUCCESS) { pjsua_im_data *im_data2; // My code /* Increment CSeq */ pjsip_cseq_hdr *cseq_hdr = PJSIP_MSG_CSEQ_HDR(tsx->last_tx); pj_uint32_t cseq = ++cseq_hdr->cseq; cseq_hdr = PJSIP_MSG_CSEQ_HDR(tdata->msg); cseq_hdr->cseq = cseq; //**** My code Rafael Maia _________________________________________________________________ Conheça os novos produtos Windows Live! Clique aqui. http://www.windowslive.com.br
BP
Benny Prijono
Thu, Oct 1, 2009 2:19 PM

2009/9/29 Rafael Maia rmaia_lcm@hotmail.com:

Hi,
i encountered a problem regarding SIP MESSAGE.

When using pjsua, if the server responds with 401 authorization
required or 407 proxy authorization required, the CSEQ should be incremented
has described in the SIP RFC 3261, page 145. Chapters 22.2 and 22.3.

Just in case anyone else needs this, here is my solution...

Good catch, I've fixed this in http://trac.pjsip.org/repos/ticket/951#comment:5

Thanks!
Benny

P.S.:

  • I simplified the patch to just one liner:
    PJSIP_MSG_CSEQ_HDR(tdata->msg)->cseq++;

file: pjsua_im.c
line: 379

if (status == PJ_SUCCESS) {
 pjsua_im_data *im_data2;

// My code
/* Increment CSeq /
pjsip_cseq_hdr cseq_hdr = PJSIP_MSG_CSEQ_HDR(tsx->last_tx);
pj_uint32_t cseq = ++cseq_hdr->cseq;
cseq_hdr = PJSIP_MSG_CSEQ_HDR(tdata->msg);
cseq_hdr->cseq = cseq;
//
** My code

Rafael Maia


Novo Internet Explorer 8: mais r?pido e muito mais seguro. Baixe agora, é
gr?tis!


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

2009/9/29 Rafael Maia <rmaia_lcm@hotmail.com>: > Hi, > i encountered a problem regarding SIP MESSAGE. > > When using pjsua, if the server responds with 401 authorization > required or 407 proxy authorization required, the CSEQ should be incremented > has described in the SIP RFC 3261, page 145. Chapters 22.2 and 22.3. > > Just in case anyone else needs this, here is my solution... > Good catch, I've fixed this in http://trac.pjsip.org/repos/ticket/951#comment:5 Thanks! Benny P.S.: - I simplified the patch to just one liner: PJSIP_MSG_CSEQ_HDR(tdata->msg)->cseq++; > file: pjsua_im.c > line: 379 > > if (status == PJ_SUCCESS) { >  pjsua_im_data *im_data2; > > // My code > /* Increment CSeq */ > pjsip_cseq_hdr *cseq_hdr = PJSIP_MSG_CSEQ_HDR(tsx->last_tx); > pj_uint32_t cseq = ++cseq_hdr->cseq; > cseq_hdr = PJSIP_MSG_CSEQ_HDR(tdata->msg); > cseq_hdr->cseq = cseq; > //**** My code > > > Rafael Maia > > ________________________________ > Novo Internet Explorer 8: mais r?pido e muito mais seguro. Baixe agora, é > gr?tis! > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > >