Bug in pjproject 2.9 (SDP attribute count)

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

 



Hi,

i didn't find any way to report a bug, so the last resort is the mailing list !

Found a bug when it comes to SDP attribute count.

The count is alway 0  ! (e.g. on_incoming_call rdata).

Parser broken ?


Callback on_incoming_call snippet:


/* Callback called by the library upon receiving incoming call */
static void on_incoming_call(pjsua_acc_id acc_id, pjsua_call_id call_id,
                 pjsip_rx_data *rdata)
{
    PJ_UNUSED_ARG(acc_id);
    pjsua_call_info ci;
    pjsip_rdata_sdp_info *sdp_info = pj_pool_alloc(rdata->tp_info.pool, 4096);
    char *sdp_print = pj_pool_alloc(rdata->tp_info.pool, 4096);
    pj_size_t size = 2048;
    int sdp_size;
   
    sdp_info = (pjsip_rdata_sdp_info*)pjsip_rdata_get_sdp_info(rdata);
    if (sdp_info) {
      PJ_LOG(3,(THIS_FILE, "Received SDP"));
      unsigned attr_cnt = sdp_info->sdp->attr_count;
      PJ_LOG(3,(THIS_FILE, "SDP Attrribute count: %d", attr_cnt));
      sdp_size = pjmedia_sdp_print(sdp_info->sdp, sdp_print, size);
      if ( sdp_size == -1)
        PJ_LOG(3,(THIS_FILE, "Cannot allocate SDP print buffer memory"));
      else {
        PJ_LOG(3,(THIS_FILE, "SDP buffer allocated: %d", sdp_size));
        fprintf(stderr, "SDP BUFFER:\n%s\n", sdp_print);
      }
    }


The count should be 9 not 0 !


Reference:

08:50:33.465                    APP  ..SDP Attrribute count: 0
08:50:33.465                    APP  ..SDP buffer allocated: 294
SDP BUFFER:
v=0
o=- 268531272 32581 IN IP4 xxx.xxx.xxx.xxx
s=-
c=IN IP4 xxx.xxx.xxx.xxx
t=0 0
m=audio 39316 RTP/AVP 8 0 18 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=direction:both
a=sendrecv
a=rtcp:39317
a=ptime:20


Best regards


Franz Skale
Rechenzentrum-Services


https://www.citycom-austria.com/rel2018/wp-content/themes/citycom/assets/img/citycom_logo.png


Citycom Telekommunikation GmbH
Gadollaplatz 1
8010 Graz | Austria

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

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

[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