Opened 5 years ago

Closed 5 years ago

#1853 closed enhancement (fixed)

Add callback for dropped data in SIP transport

Reported by: ming Owned by: bennylp
Priority: normal Milestone: release-2.4.5
Component: pjsip Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported: no

Description

Provide a new callback pjsip_tp_on_rx_dropped_cb() which will be called whenever SIP transport drops data with the following information:

/**
 * Structure of dropped received data.
 */
typedef struct pjsip_tp_dropped_data
{
    /**
     * The transport receiving the data.
     */
    pjsip_transport *tp;

    /**
     * The data.
     */
    void	    *data;

    /**
     * The data length.
     * If the status field below indicates an invalid SIP message
     * (PJSIP_EINVALIDMSG) and application detects a SIP message
     * at position p, it can pass the data back to PJSIP to be processed
     * by setting the len to p. This can be useful for apps which
     * wishes to use the same transport for SIP signalling and non-SIP
     * purposes (such as SIP outbound using STUN message).
     */
    pj_size_t	     len;

    /**
     * The status or reason of drop. For example, a leading newlines (common
     * keep-alive packet) will be dropped with status PJ_EIGNORED, an invalid
     * SIP message will have status PJSIP_EINVALIDMSG, a SIP message overflow
     * will have status PJSIP_ERXOVERFLOW.
     */
    pj_status_t	     status;

} pjsip_tp_dropped_data;

Change History (1)

comment:1 Changed 5 years ago by ming

  • Resolution set to fixed
  • Status changed from new to closed

In 5097:

Fixed #1853: Add callback for dropped data in SIP transport

Note: See TracTickets for help on using tickets.