Opened 16 years ago

Closed 16 years ago

#760 closed enhancement (fixed)

Enhancements to PUBLISH management (thanks Johan Lantz for the suggestion)

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

Description

Several new enhancements for the PUBLISH handling (for presence):

  • provide callback in PJSUA-LIB when PUBLISH session terminates, so that application may renew the session if necessary.
  • handle some failure scenarios automatically, such as:
    • 412/Conditional Request Failed
    • 423/Interval Too Brief
    • 408/Request time out
  • subsequent PUBLISH refresh should contain the custom headers that the application adds.

Change History (1)

comment:1 Changed 16 years ago by bennylp

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

In r2661:

  • Decided to make the bulk of the changes in PJSUA-LIB instead of in publish session itself, to make the handling simpler.
  • Decided to not provide callback in PJSUA-LIB, since we don't have API to force refresh anyway. Instead, PJSUA-LIB will retry failed request automatically (see below)
  • Changes in PJSUA-LIB
    • retry with fresh request on 412/Conditional Request Failed response
    • changed default Expires in PUBLISH request to none (we will not put Expires), to avoid getting 423/Interval Too Brief response
    • if the PUBLISH fails for any reason, it will be retried on every PJSUA_PRES_TIMER (default 300 seconds), similar to how failed SUBSCRIBE will be retried
  • Changes to publish.h:
    • added API to add headers in every PUBLISH request (pjsip_publishc_set_headers())
  • Added test scenario in Python unit tests
Note: See TracTickets for help on using tickets.