Module: sip-router Branch: kamailio_3.0 Commit: 1a9f379ed66dbcc05f7750ff961c0a7a6607b0db URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1a9f379e...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Wed Jan 6 18:50:31 2010 +0100
presence(k): aliased MLA to SLA
- doc updated to reflect RFCs and drafts
---
modules_k/presence/subscribe.c | 19 +++++++++------- modules_k/presence/utils_func.h | 3 +- modules_k/presence_xml/README | 11 ++++++--- modules_k/presence_xml/doc/presence_xml_admin.xml | 24 ++++++++++++++++---- 4 files changed, 39 insertions(+), 18 deletions(-)
diff --git a/modules_k/presence/subscribe.c b/modules_k/presence/subscribe.c index 3067919..6ea70ae 100644 --- a/modules_k/presence/subscribe.c +++ b/modules_k/presence/subscribe.c @@ -802,7 +802,7 @@ int extract_sdialog_info(subs_t* subs,struct sip_msg* msg, int mexp, else { memset( &TO , 0, sizeof(TO) ); - if( !parse_to(msg->to->body.s,msg->to->body.s + msg->to->body.len + 1, &TO)); + if( !parse_to(msg->to->body.s,msg->to->body.s + msg->to->body.len + 1, &TO)) { LM_DBG("'To' header NOT parsed\n"); goto error; @@ -1030,16 +1030,19 @@ int get_stored_info(struct sip_msg* msg, subs_t* subs, int* reply_code, { lock_get(&subs_htable[i].lock); s= search_shtable(subs_htable, subs->callid,subs->to_tag,subs->from_tag, i); - if (s && !EVENT_DIALOG_SLA(s->event->evp)) + if (s) { - pres_uri.s= (char*)pkg_malloc(s->pres_uri.len* sizeof(char)); - if(pres_uri.s== NULL) + if(!EVENT_DIALOG_SLA(s->event->evp)) { - lock_release(&subs_htable[i].lock); - ERR_MEM(PKG_MEM_STR); + pres_uri.s= (char*)pkg_malloc(s->pres_uri.len* sizeof(char)); + if(pres_uri.s== NULL) + { + lock_release(&subs_htable[i].lock); + ERR_MEM(PKG_MEM_STR); + } + memcpy(pres_uri.s, s->pres_uri.s, s->pres_uri.len); + pres_uri.len= s->pres_uri.len; } - memcpy(pres_uri.s, s->pres_uri.s, s->pres_uri.len); - pres_uri.len= s->pres_uri.len; goto found_rec; } lock_release(&subs_htable[i].lock); diff --git a/modules_k/presence/utils_func.h b/modules_k/presence/utils_func.h index c6590c8..5f94f0b 100644 --- a/modules_k/presence/utils_func.h +++ b/modules_k/presence/utils_func.h @@ -50,7 +50,8 @@
#define EVENT_DIALOG_SLA(ev) \ - ((ev)->type == EVENT_DIALOG && (ev)->params.dialog.sla) + ((ev)->type == EVENT_DIALOG \ + && ((ev)->params.dialog.sla || (ev)->params.dialog.ma))
static inline int uandd_to_uri(str user, str domain, str *out) diff --git a/modules_k/presence_xml/README b/modules_k/presence_xml/README index e38262c..1b6e0d6 100644 --- a/modules_k/presence_xml/README +++ b/modules_k/presence_xml/README @@ -90,10 +90,13 @@ Chapter 1. Admin Guide
The module does specific handling for notify-subscribe events using xml bodies. It is used with the general event handling module, presence. It - constructs and adds 3 events to it: presence, presence.winfo, - dialog;sla. By default all these events will be handled. If you do want - to activate only certain events then disable the unneeded events via - the module parameters. + constructs and adds 3 events to it: + * presence - SIMPLE status presence: RFC 3856 + * presence.winfo - SIMPLE watcher info: RFC 3857 + * dialog;sla (or dialog;ma) - Bridged Line Appearances (BLA) (or + Multiple Line Appearances (MLA)): draft-anil-sipping-bla + + You can control which events are enabled via module parameters.
This module takes the XCAP permission rule documents from xcap_table. The presence permission rules are interpreted according to the diff --git a/modules_k/presence_xml/doc/presence_xml_admin.xml b/modules_k/presence_xml/doc/presence_xml_admin.xml index cefadf0..1ee17c6 100644 --- a/modules_k/presence_xml/doc/presence_xml_admin.xml +++ b/modules_k/presence_xml/doc/presence_xml_admin.xml @@ -16,11 +16,25 @@ <section> <title>Overview</title> <para> - The module does specific handling for notify-subscribe events using xml bodies. - It is used with the general event handling module, presence. It constructs and adds - 3 events to it: presence, presence.winfo, dialog;sla. By default all these events - will be handled. If you do want to activate only certain events then disable the - unneeded events via the module parameters. + The module does specific handling for notify-subscribe events using xml + bodies. It is used with the general event handling module, presence. + It constructs and adds 3 events to it: + <itemizedlist> + <listitem> + <para>presence - SIMPLE status presence: RFC 3856</para> + </listitem> + <listitem> + <para>presence.winfo - SIMPLE watcher info: RFC 3857</para> + </listitem> + <listitem> + <para>dialog;sla (or dialog;ma) - Bridged Line Appearances + (BLA) (or Multiple Line Appearances (MLA)): + draft-anil-sipping-bla</para> + </listitem> + </itemizedlist> + </para> + <para> + You can control which events are enabled via module parameters. </para> <para> This module takes the XCAP permission rule documents from xcap_table.