[sr-dev] git:master: modules_k/textops: Added new exported function append_time_to_request()

Peter Dunkley peter.dunkley at crocodile-rcs.com
Tue Aug 9 15:52:10 CEST 2011


Module: sip-router
Branch: master
Commit: 233d01912e4ea5965fb68361f406aee0f650efac
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=233d01912e4ea5965fb68361f406aee0f650efac

Author: pd <peter.dunkley at crocodile-rcs.com>
Committer: pd <peter.dunkley at crocodile-rcs.com>
Date:   Tue Aug  9 14:47:19 2011 +0100

modules_k/textops: Added new exported function append_time_to_request()

- This function is similar to the existing append_time(), but the existing
  function adds the Date header to replies generated by Kamailio.  This
  function modifies the request.

  In my scenario I want all MESSAGE requests to contain Date headers.  The
  MSILO module inserts Date headers into MESSAGEs that have been stored,
  but not all clients insert Date headers.  This function enables me
  to ensure all MESSAGE requests contain the Date header that I require.

  This is not exactly correct as the Date header should reflect the time
  when the request is first sent - but the current time on the Kamailio
  server is better than nothing and good enough for my needs.

- Usage example:

  if (is_method("MESSAGE") && !is_present_hf("Date"))
      append_time_to_request();

---

 modules_k/textops/README                |  133 ++++++++++++++++++------------
 modules_k/textops/doc/textops_admin.xml |   56 +++++++++++++
 modules_k/textops/textops.c             |   49 +++++++++++
 3 files changed, 185 insertions(+), 53 deletions(-)

Diff:   http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=233d01912e4ea5965fb68361f406aee0f650efac



More information about the sr-dev mailing list