Profile related functions for the dialog moduleModule: dialog :: Kamailio dialog module. More...
#include "../../parser/msg_parser.h"#include "../../lib/srutils/srjson.h"#include "../../locking.h"#include "../../str.h"#include "../../modules/tm/h_table.h"

Go to the source code of this file.
Definition in file dlg_profile.h.
| int add_profile_definitions | ( | char * | profiles, | |
| unsigned int | has_value | |||
| ) |
| profiles | profile name | |
| has_value | set to 0 for a profile without value, otherwise it has a value |
Definition at line 77 of file dlg_profile.c.
References _str::len, new_dlg_profile(), PROFILE_HASH_SIZE, and _str::s.

| void destroy_linkers | ( | struct dlg_profile_link * | linker | ) |
| linker | dialog linker |
Definition at line 261 of file dlg_profile.c.
References dlg_profile_entry::content, dlg_profile_table::entries, and dlg_profile_hash::hash.
Referenced by destroy_dlg(), profile_cleanup(), set_current_dialog(), set_dlg_profile(), and unset_dlg_profile().

| int dlg_add_profile | ( | dlg_cell_t * | dlg, | |
| str * | value, | |||
| struct dlg_profile_table * | profile | |||
| ) |
| dlg | dialog | |
| value | value | |
| profile | dialog profile table |
Definition at line 496 of file dlg_profile.c.
References dlg_profile_table::has_value, _str::len, link_dlg_profile(), _str::s, and dlg_profile_hash::value.
Referenced by dlg_json_to_profiles().


| unsigned int get_profile_size | ( | struct dlg_profile_table * | profile, | |
| str * | value | |||
| ) |
| profile | evaluated profile | |
| value | value |
Definition at line 648 of file dlg_profile.c.
References calc_hash_profile(), dlg_profile_entry::content, dlg_profile_table::entries, dlg_profile_table::has_value, _str::len, _str::s, dlg_profile_table::size, and dlg_profile_hash::value.
Referenced by mi_get_profile().


| int is_dlg_in_profile | ( | struct sip_msg * | msg, | |
| struct dlg_profile_table * | profile, | |||
| str * | value | |||
| ) |
| msg | SIP message | |
| profile | dialog profile table | |
| value | value |
Definition at line 603 of file dlg_profile.c.
References d_table, dlg_get_msg_dialog(), dlg_lock, dlg_release(), dlg_unlock, dlg_table::entries, dlg_cell::h_entry, dlg_profile_table::has_value, _str::len, dlg_cell::profile_links, _str::s, and dlg_profile_hash::value.

| struct mi_root* mi_get_profile | ( | struct mi_root * | cmd_tree, | |
| void * | param | |||
| ) | [read] |
| cmd_tree | MI command tree | |
| param | MI parameter |
| cmd_tree | MI command tree | |
| param | unused |
Definition at line 708 of file dlg_profile.c.
References get_profile_size(), int2str(), _str::len, dlg_profile_table::name, _str::s, search_dlg_profile(), and dlg_profile_table::size.

| struct mi_root* mi_profile_list | ( | struct mi_root * | cmd_tree, | |
| void * | param | |||
| ) | [read] |
| cmd_tree | MI command tree | |
| param | unused |
Definition at line 789 of file dlg_profile.c.
References dlg_profile_hash::dlg, dlg_profile_table::entries, dlg_profile_table::has_value, _str::len, mi_print_dlg(), _str::s, search_dlg_profile(), dlg_profile_table::size, and dlg_profile_hash::value.

| int profile_cleanup | ( | struct sip_msg * | msg, | |
| unsigned int | flags, | |||
| void * | param | |||
| ) |
| msg | SIP message | |
| flags | unused | |
| param | unused |
Definition at line 301 of file dlg_profile.c.
References current_dlg_msg_id, destroy_linkers(), dlg_cell::dflags, dlg_profile_hash::dlg, DLG_FLAG_TM, and dlg_unref().

| struct dlg_profile_table* search_dlg_profile | ( | str * | name | ) | [read] |
| name | searched dialog profile |
Definition at line 136 of file dlg_profile.c.
References _str::len, dlg_profile_table::name, and _str::s.
Referenced by dlg_json_to_profiles(), mi_get_profile(), mi_profile_list(), and new_dlg_profile().

| void set_current_dialog | ( | sip_msg_t * | msg, | |
| dlg_cell_t * | dlg | |||
| ) |
| msg | SIP message | |
| dlg | dialog cell |
Definition at line 401 of file dlg_profile.c.
References current_dlg_msg_id, destroy_linkers(), dlg_cell::h_entry, dlg_cell::h_id, sip_msg::id, link_dlg_profile(), and sip_msg::pid.
Referenced by dlg_new_dialog(), and dlg_onroute().


| int set_dlg_profile | ( | struct sip_msg * | msg, | |
| str * | value, | |||
| struct dlg_profile_table * | profile | |||
| ) |
| msg | SIP message | |
| value | value | |
| profile | dialog profile table |
Set the dialog profile.
| msg | SIP message | |
| value | value | |
| profile | dialog profile table |
Definition at line 434 of file dlg_profile.c.
References current_dlg_msg_id, destroy_linkers(), dlg_get_msg_dialog(), dlg_release(), dlg_profile_table::has_value, sip_msg::id, _str::len, link_dlg_profile(), sip_msg::pid, _str::s, and dlg_profile_hash::value.

| int unset_dlg_profile | ( | sip_msg_t * | msg, | |
| str * | value, | |||
| dlg_profile_table_t * | profile | |||
| ) |
| msg | SIP message | |
| value | value | |
| profile | dialog profile table |
Definition at line 536 of file dlg_profile.c.
References d_table, destroy_linkers(), dlg_get_msg_dialog(), dlg_lock, dlg_release(), dlg_unlock, dlg_table::entries, dlg_cell::h_entry, dlg_profile_table::has_value, _str::len, dlg_cell::profile_links, and _str::s.

1.7.1