1 /**
2  * Functions to force or check the service-routes
3  *
4  * Copyright (c) 2012 Carsten Bock, ng-voice GmbH
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 #ifndef SERVICE_ROUTES_H
24 #define SERVICE_ROUTES_H
25 
26 #include "../../core/parser/msg_parser.h"
27 #include "../ims_usrloc_pcscf/usrloc.h"
28 
29 #define MAXROUTES 10
30 #define MAXROUTESIZE 255
31 /**
32  * Check, if a user-agent follows the indicated service-routes
33  */
34 int check_service_routes(struct sip_msg* _m, udomain_t* _d);
35 
36 /**
37  * Force Service routes (upon request)
38  */
39 int force_service_routes(struct sip_msg* _m, udomain_t* _d);
40 
41 /**
42  * Check, if source is registered.
43  */
44 int is_registered(struct sip_msg* _m, udomain_t* _d);
45 
46 /**
47  * Get the current asserted identity for the user
48  */
49 str * get_asserted_identity(struct sip_msg* _m);
50 
51 /**
52  * Get the contact used during registration of this user
53  */
54 str * get_registration_contact(struct sip_msg* _m);
55 
56 /**
57  * Assert a given identity of a user
58  */
59 int assert_identity(struct sip_msg* _m, udomain_t* _d, str identity);
60 
61 /**
62  * Assert a given called identity of a user
63  */
64 int assert_called_identity(struct sip_msg* _m, udomain_t* _d);
65 
66 /**
67  * Unregister a contact
68  */
69 int pcscf_unregister(udomain_t* _d, str * uri, str * received_host, int received_port);
70 
71 #endif /* SERVICE_ROUTES_H */
72