Browse code

registrar: added function reg_from_user(ultable, uri, mode)

- return true if the message came from the user identified uri parameter
by matching agains its location records

Daniel-Constantin Mierla authored on 20/05/2022 11:17:24
Showing 1 changed files
... ...
@@ -55,5 +55,6 @@ sr_kemi_xval_t* ki_reg_ulc_cget(sip_msg_t* msg, str* rid, str* attr, int idx);
55 55
 
56 56
 int ki_lookup_xavp(sip_msg_t* msg, str *utname, str* uri,
57 57
 		str* rxname, str *cxname);
58
+int ki_reg_from_user(sip_msg_t* msg, str *utname, str* uri, int vmode);
58 59
 
59 60
 #endif
Browse code

registrar: added lookup_xavp("ultable", "uri", "rxname", "cxname")

- lookup of uri and store record and contact attributes in xavps

Daniel-Constantin Mierla authored on 12/05/2022 16:18:14
Showing 1 changed files
... ...
@@ -53,4 +53,7 @@ void reg_ul_expired_contact(ucontact_t* c, int type, void* param);
53 53
 sr_kemi_xval_t* ki_reg_ulc_rget(sip_msg_t* msg, str* rid, str* attr);
54 54
 sr_kemi_xval_t* ki_reg_ulc_cget(sip_msg_t* msg, str* rid, str* attr, int idx);
55 55
 
56
+int ki_lookup_xavp(sip_msg_t* msg, str *utname, str* uri,
57
+		str* rxname, str *cxname);
58
+
56 59
 #endif
Browse code

registrar: kemi functions to get $ulc(...) attributes

Daniel-Constantin Mierla authored on 12/05/2022 09:21:46
Showing 1 changed files
... ...
@@ -31,6 +31,7 @@
31 31
 #define _REGPV_H_
32 32
 
33 33
 #include "../../core/pvar.h"
34
+#include "../../core/kemi.h"
34 35
 #include "../../modules/usrloc/usrloc.h"
35 36
 
36 37
 int pv_get_ulc(struct sip_msg *msg,  pv_param_t *param,
... ...
@@ -49,4 +50,7 @@ void regpv_free_profiles(void);
49 50
 
50 51
 void reg_ul_expired_contact(ucontact_t* c, int type, void* param);
51 52
 
53
+sr_kemi_xval_t* ki_reg_ulc_rget(sip_msg_t* msg, str* rid, str* attr);
54
+sr_kemi_xval_t* ki_reg_ulc_cget(sip_msg_t* msg, str* rid, str* attr, int idx);
55
+
52 56
 #endif
Browse code

registrar: more functions exported to kemi framework

Daniel-Constantin Mierla authored on 01/05/2017 06:08:28
Showing 1 changed files
... ...
@@ -41,7 +41,9 @@ int pv_parse_ulc_name(pv_spec_p sp, str *in);
41 41
 
42 42
 int pv_fetch_contacts(struct sip_msg* msg, char* table, char* uri,
43 43
 		char* profile);
44
+int ki_reg_fetch_contacts(sip_msg_t* msg, str* dtable, str* uri, str* profile);
44 45
 int pv_free_contacts(struct sip_msg* msg, char* profile, char *s2);
46
+int ki_reg_free_contacts(sip_msg_t* msg, str* profile);
45 47
 
46 48
 void regpv_free_profiles(void);
47 49
 
Browse code

core, lib, modules: updated include paths for header files

Daniel-Constantin Mierla authored on 07/12/2016 11:07:22
Showing 1 changed files
... ...
@@ -30,7 +30,7 @@
30 30
 #ifndef _REGPV_H_
31 31
 #define _REGPV_H_
32 32
 
33
-#include "../../pvar.h"
33
+#include "../../core/pvar.h"
34 34
 #include "../../modules/usrloc/usrloc.h"
35 35
 
36 36
 int pv_get_ulc(struct sip_msg *msg,  pv_param_t *param,
Browse code

core, lib, modules: restructured source code tree

- new folder src/ to hold the source code for main project applications
- main.c is in src/
- all core files are subfolder are in src/core/
- modules are in src/modules/
- libs are in src/lib/
- application Makefiles are in src/
- application binary is built in src/ (src/kamailio)

Daniel-Constantin Mierla authored on 07/12/2016 11:03:51
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,50 @@
1
+/*
2
+ * Export contact attrs as PV
3
+ *
4
+ * Copyright (C) 2008 Daniel-Constantin Mierla (asipto.com)
5
+ *
6
+ * This file is part of Kamailio, a free SIP server.
7
+ *
8
+ * Kamailio is free software; you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation; either version 2 of the License, or
11
+ * (at your option) any later version
12
+ *
13
+ * Kamailio is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program; if not, write to the Free Software
20
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
21
+ */
22
+
23
+/*!
24
+ * \file
25
+ * \brief SIP registrar module - export contacts as PV
26
+ * \ingroup registrar
27
+ */
28
+
29
+
30
+#ifndef _REGPV_H_
31
+#define _REGPV_H_
32
+
33
+#include "../../pvar.h"
34
+#include "../../modules/usrloc/usrloc.h"
35
+
36
+int pv_get_ulc(struct sip_msg *msg,  pv_param_t *param,
37
+		pv_value_t *res);
38
+int pv_set_ulc(struct sip_msg* msg, pv_param_t *param,
39
+		int op, pv_value_t *val);
40
+int pv_parse_ulc_name(pv_spec_p sp, str *in);
41
+
42
+int pv_fetch_contacts(struct sip_msg* msg, char* table, char* uri,
43
+		char* profile);
44
+int pv_free_contacts(struct sip_msg* msg, char* profile, char *s2);
45
+
46
+void regpv_free_profiles(void);
47
+
48
+void reg_ul_expired_contact(ucontact_t* c, int type, void* param);
49
+
50
+#endif