Browse code

ims_usrloc_pcscf: added a reverse searchin get_pcontact

- added a new parameter for reverse search in get_pcontact.

Aleksandar Yosifov authored on 03/08/2020 11:45:01 • Henning Westerholt committed on 12/08/2020 18:44:08
Showing 1 changed files
... ...
@@ -74,7 +74,7 @@ void unlock_ulslot(udomain_t* _d, int i);
74 74
 int update_rx_regsession(struct udomain* _d, str* session_id, struct pcontact* _c);
75 75
 int update_pcontact(struct udomain* _d, struct pcontact_info* _ci, struct pcontact* _c);
76 76
 int insert_pcontact(struct udomain* _d, str* _contact, struct pcontact_info* _ci, struct pcontact** _r);
77
-int get_pcontact(udomain_t* _d, pcontact_info_t* contact_info, struct pcontact** _r);
77
+int get_pcontact(udomain_t* _d, pcontact_info_t* contact_info, struct pcontact** _c, int reverse_search);
78 78
 int assert_identity(udomain_t* _d, str * _host, unsigned short _port, unsigned short _proto, str * _identity);
79 79
 int delete_pcontact(udomain_t* _d, struct pcontact* _r);
80 80
 int unreg_pending_contacts_cb(udomain_t* _d, pcontact_t* _c, int type);
Browse code

ims_usrloc_pcscf: added a new match key for ipsec location tbl

- ipsec location table: added a new match key for ipsec location
table. The added key is "received_port" column. It's necessary
because after successful re-registration into the table are
stored two contacts withe the same AOR. Before the changes only
the AOR was contact's match key.
- ul callbacks: added a method delete_ulcb(), wich is used to delete
the pending IPSEC tunnels for the unsuccessfuly registered contacts.
- udomain: adde a new method unreg_pending_contacts_cb(). Used to search
and delete user callbacks for all pending contacts with default SIP
port (5060) after successful contact registration.
- ipsec structure: added a new vars in ipsec_t - port_pc (port proxy
client) and port_ps (port proxy server). Used to keep proxy ports
for already created IPSEC tunnels.

Aleksandar Yosifov authored on 28/06/2019 14:37:15
Showing 1 changed files
... ...
@@ -77,6 +77,7 @@ int insert_pcontact(struct udomain* _d, str* _contact, struct pcontact_info* _ci
77 77
 int get_pcontact(udomain_t* _d, pcontact_info_t* contact_info, struct pcontact** _r);
78 78
 int assert_identity(udomain_t* _d, str * _host, unsigned short _port, unsigned short _proto, str * _identity);
79 79
 int delete_pcontact(udomain_t* _d, struct pcontact* _r);
80
+int unreg_pending_contacts_cb(udomain_t* _d, pcontact_t* _c, int type);
80 81
 int update_security(udomain_t* _d, security_type _t, security_t* _s, struct pcontact* _c);
81 82
 int update_temp_security(udomain_t* _d, security_type _t, security_t* _s, struct pcontact* _c);
82 83
 
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
... ...
@@ -46,9 +46,9 @@
46 46
 
47 47
 
48 48
 #include <stdio.h>
49
-#include "../../counters.h"
50
-#include "../../locking.h"
51
-#include "../../str.h"
49
+#include "../../core/counters.h"
50
+#include "../../core/locking.h"
51
+#include "../../core/str.h"
52 52
 #include "../../lib/srdb1/db.h"
53 53
 #include "pcontact.h"
54 54
 #include "hslot.h"
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,85 @@
1
+/*
2
+ * Copyright (C) 2012 Smile Communications, jason.penton@smilecoms.com
3
+ * Copyright (C) 2012 Smile Communications, richard.good@smilecoms.com
4
+ *
5
+ * The initial version of this code was written by Dragos Vingarzan
6
+ * (dragos(dot)vingarzan(at)fokus(dot)fraunhofer(dot)de and the
7
+ * Fruanhofer Institute. It was and still is maintained in a separate
8
+ * branch of the original SER. We are therefore migrating it to
9
+ * Kamailio/SR and look forward to maintaining it from here on out.
10
+ * 2011/2012 Smile Communications, Pty. Ltd.
11
+ * ported/maintained/improved by
12
+ * Jason Penton (jason(dot)penton(at)smilecoms.com and
13
+ * Richard Good (richard(dot)good(at)smilecoms.com) as part of an
14
+ * effort to add full IMS support to Kamailio/SR using a new and
15
+ * improved architecture
16
+ *
17
+ * NB: Alot of this code was originally part of OpenIMSCore,
18
+ * FhG Fokus.
19
+ * Copyright (C) 2004-2006 FhG Fokus
20
+ * Thanks for great work! This is an effort to
21
+ * break apart the various CSCF functions into logically separate
22
+ * components. We hope this will drive wider use. We also feel
23
+ * that in this way the architecture is more complete and thereby easier
24
+ * to manage in the Kamailio/SR environment
25
+ *
26
+ * This file is part of Kamailio, a free SIP server.
27
+ *
28
+ * Kamailio is free software; you can redistribute it and/or modify
29
+ * it under the terms of the GNU General Public License as published by
30
+ * the Free Software Foundation; either version 2 of the License, or
31
+ * (at your option) any later version
32
+ *
33
+ * Kamailio is distributed in the hope that it will be useful,
34
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
35
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
36
+ * GNU General Public License for more details.
37
+ *
38
+ * You should have received a copy of the GNU General Public License
39
+ * along with this program; if not, write to the Free Software
40
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
41
+ *
42
+ */
43
+
44
+#ifndef UDOMAIN_H
45
+#define UDOMAIN_H
46
+
47
+
48
+#include <stdio.h>
49
+#include "../../counters.h"
50
+#include "../../locking.h"
51
+#include "../../str.h"
52
+#include "../../lib/srdb1/db.h"
53
+#include "pcontact.h"
54
+#include "hslot.h"
55
+#include "usrloc.h"
56
+
57
+struct hslot;   /*!< Hash table slot */
58
+struct pcontact; /*!< contact record */
59
+
60
+int new_udomain(str* _n, int _s, udomain_t** _d);
61
+void free_udomain(udomain_t* _d);
62
+void print_udomain(FILE* _f, udomain_t* _d);
63
+
64
+void mem_timer_udomain(udomain_t* _d);
65
+int mem_insert_pcontact(struct udomain* _d, str* _contact, struct pcontact_info* _ci, struct pcontact** _c);
66
+void mem_delete_pcontact(udomain_t* _d, struct pcontact* _r);
67
+
68
+void lock_udomain(udomain_t* _d, str* _via_host, unsigned short via_port, unsigned short via_protot);
69
+void unlock_udomain(udomain_t* _d, str* _via_host, unsigned short via_port, unsigned short via_proto);
70
+
71
+void lock_ulslot(udomain_t* _d, int i);
72
+void unlock_ulslot(udomain_t* _d, int i);
73
+
74
+int update_rx_regsession(struct udomain* _d, str* session_id, struct pcontact* _c);
75
+int update_pcontact(struct udomain* _d, struct pcontact_info* _ci, struct pcontact* _c);
76
+int insert_pcontact(struct udomain* _d, str* _contact, struct pcontact_info* _ci, struct pcontact** _r);
77
+int get_pcontact(udomain_t* _d, pcontact_info_t* contact_info, struct pcontact** _r);
78
+int assert_identity(udomain_t* _d, str * _host, unsigned short _port, unsigned short _proto, str * _identity);
79
+int delete_pcontact(udomain_t* _d, struct pcontact* _r);
80
+int update_security(udomain_t* _d, security_type _t, security_t* _s, struct pcontact* _c);
81
+int update_temp_security(udomain_t* _d, security_type _t, security_t* _s, struct pcontact* _c);
82
+
83
+int preload_udomain(db1_con_t* _c, udomain_t* _d);
84
+
85
+#endif