Browse code

phonenum: new param resid to register result container ids

- allow use in KEMI scripting by pre-registering container result id via
modparam

Daniel-Constantin Mierla authored on 02/09/2019 11:41:03
Showing 1 changed files
... ...
@@ -34,6 +34,7 @@ int phonenum_init_pv(int smode);
34 34
 void phonenum_destroy_pv(void);
35 35
 void phonenum_pv_reset(str *pvclass);
36 36
 int phonenum_update_pv(str *tomatch, str *cncode, str *pvclass);
37
+int sr_phonenum_add_resid(str *rname);
37 38
 
38 39
 #endif
39 40
 
Browse code

phonenum: set the order of params for phonenum_match_cn()

Daniel-Constantin Mierla authored on 28/03/2018 06:26:02
Showing 1 changed files
... ...
@@ -33,7 +33,7 @@ int pv_get_phonenum(struct sip_msg *msg, pv_param_t *param,
33 33
 int phonenum_init_pv(int smode);
34 34
 void phonenum_destroy_pv(void);
35 35
 void phonenum_pv_reset(str *pvclass);
36
-int phonenum_update_pv(str *tomatch, str *pvclass, str *cncode);
36
+int phonenum_update_pv(str *tomatch, str *cncode, str *pvclass);
37 37
 
38 38
 #endif
39 39
 
Browse code

phonenum: new function phonenum_match_cn(...)

- match a phone number within a specific country provided by country
code two letter

Daniel-Constantin Mierla authored on 27/03/2018 19:59:24
Showing 1 changed files
... ...
@@ -33,7 +33,7 @@ int pv_get_phonenum(struct sip_msg *msg, pv_param_t *param,
33 33
 int phonenum_init_pv(int smode);
34 34
 void phonenum_destroy_pv(void);
35 35
 void phonenum_pv_reset(str *pvclass);
36
-int phonenum_update_pv(str *tomatch, str *pvclass);
36
+int phonenum_update_pv(str *tomatch, str *pvclass, str *cncode);
37 37
 
38 38
 #endif
39 39
 
Browse code

phonenum: new module to do lookup on phone numbers

- relies on libphonenumber to get the attributes associated with the
phone number

Daniel-Constantin Mierla authored on 16/10/2017 08:54:44
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,39 @@
1
+/**
2
+ *
3
+ * Copyright (C) 2017 Daniel-Constantin Mierla (asipto.com)
4
+ *
5
+ * This file is part of Kamailio, a free SIP server.
6
+ *
7
+ * This file is free software; you can redistribute it and/or modify
8
+ * it under the terms of the GNU General Public License as published by
9
+ * the Free Software Foundation; either version 2 of the License, or
10
+ * (at your option) any later version
11
+ *
12
+ *
13
+ * This file 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
+#ifndef _PHONENUM_PV_H_
25
+#define _PHONENUM_PV_H_
26
+
27
+#include "../../core/pvar.h"
28
+
29
+int pv_parse_phonenum_name(pv_spec_p sp, str *in);
30
+int pv_get_phonenum(struct sip_msg *msg, pv_param_t *param,
31
+		pv_value_t *res);
32
+
33
+int phonenum_init_pv(int smode);
34
+void phonenum_destroy_pv(void);
35
+void phonenum_pv_reset(str *pvclass);
36
+int phonenum_update_pv(str *tomatch, str *pvclass);
37
+
38
+#endif
39
+