Asterisk - The Open Source Telephony Project
18.5.0
|
sip utils header file More...
Go to the source code of this file.
Macros | |
#define | IS_SIP_TECH(t) ((t) == &sip_tech || (t) == &sip_tech_info) |
Functions | |
const char * | comedia_string (struct ast_flags *flags) |
Return a string describing the comedia value for the given flags. More... | |
const char * | find_closing_quote (const char *start, const char *lim) |
Locate closing quote in a string, skipping escaped quotes. optionally with a limit on the search. start must be past the first quote. More... | |
const char * | force_rport_string (struct ast_flags *flags) |
Return a string describing the force_rport value for the given flags. More... | |
const char * | hangup_cause2sip (int cause) |
Convert Asterisk hangup causes to SIP codes. More... | |
int | hangup_sip2cause (int cause) |
Convert SIP hangup causes to Asterisk hangup causes. More... | |
unsigned int | port_str2int (const char *pt, unsigned int standard) |
converts ascii port to int representation. More... | |
sip utils header file
Definition in file sip_utils.h.
#define IS_SIP_TECH | ( | t | ) | ((t) == &sip_tech || (t) == &sip_tech_info) |
Definition at line 26 of file sip_utils.h.
Referenced by func_header_read(), func_headers_read2(), handle_request_bye(), sip_acf_channel_read(), and sip_dtmfmode().
const char* comedia_string | ( | struct ast_flags * | flags | ) |
Return a string describing the comedia value for the given flags.
Definition at line 43 of file channels/sip/utils.c.
References AST_CLI_YESNO, ast_test_flag, SIP_PAGE2_SYMMETRICRTP, and SIP_PAGE3_NAT_AUTO_COMEDIA.
Referenced by _sip_show_peer(), _sip_show_peers_one(), and sip_show_settings().
const char* find_closing_quote | ( | const char * | start, |
const char * | lim | ||
) |
Locate closing quote in a string, skipping escaped quotes. optionally with a limit on the search. start must be past the first quote.
Definition at line 5074 of file chan_sip.c.
Referenced by get_comma(), get_in_brackets_const(), get_in_brackets_full(), and parse_moved_contact().
const char* force_rport_string | ( | struct ast_flags * | flags | ) |
Return a string describing the force_rport value for the given flags.
Definition at line 35 of file channels/sip/utils.c.
References AST_CLI_YESNO, ast_test_flag, SIP_NAT_FORCE_RPORT, and SIP_PAGE3_NAT_AUTO_RPORT.
Referenced by _sip_show_peer(), _sip_show_peers_one(), sip_show_channel(), and sip_show_settings().
const char* hangup_cause2sip | ( | int | cause | ) |
Convert Asterisk hangup causes to SIP codes.
Possible values from causes.h AST_CAUSE_NOTDEFINED AST_CAUSE_NORMAL AST_CAUSE_BUSY AST_CAUSE_FAILURE AST_CAUSE_CONGESTION AST_CAUSE_UNALLOCATED In addition to these, a lot of PRI codes is defined in causes.h ...should we take care of them too ? Quote RFC 3398 ISUP Cause value SIP response ---------------- ------------ 1 unallocated number 404 Not Found 2 no route to network 404 Not found 3 no route to destination 404 Not found 16 normal call clearing --- (*) 17 user busy 486 Busy here 18 no user responding 408 Request Timeout 19 no answer from the user 480 Temporarily unavailable 20 subscriber absent 480 Temporarily unavailable 21 call rejected 403 Forbidden (+) 22 number changed (w/o diagnostic) 410 Gone 22 number changed (w/ diagnostic) 301 Moved Permanently 23 redirection to new destination 410 Gone 26 non-selected user clearing 404 Not Found (=) 27 destination out of order 502 Bad Gateway 28 address incomplete 484 Address incomplete 29 facility rejected 501 Not implemented 31 normal unspecified 480 Temporarily unavailable
Definition at line 7108 of file chan_sip.c.
References AST_CAUSE_BEARERCAPABILITY_NOTAVAIL, AST_CAUSE_CALL_REJECTED, AST_CAUSE_CHAN_NOT_IMPLEMENTED, AST_CAUSE_CONGESTION, AST_CAUSE_DESTINATION_OUT_OF_ORDER, AST_CAUSE_FACILITY_REJECTED, AST_CAUSE_FAILURE, AST_CAUSE_INTERWORKING, AST_CAUSE_INVALID_NUMBER_FORMAT, AST_CAUSE_NO_ANSWER, AST_CAUSE_NO_ROUTE_DESTINATION, AST_CAUSE_NO_ROUTE_TRANSIT_NET, AST_CAUSE_NO_USER_RESPONSE, AST_CAUSE_NORMAL_UNSPECIFIED, AST_CAUSE_NOTDEFINED, AST_CAUSE_NUMBER_CHANGED, AST_CAUSE_SWITCH_CONGESTION, AST_CAUSE_UNALLOCATED, AST_CAUSE_UNREGISTERED, AST_CAUSE_USER_BUSY, ast_debug, and NULL.
Referenced by sip_hangup().
int hangup_sip2cause | ( | int | cause | ) |
Convert SIP hangup causes to Asterisk hangup causes.
Definition at line 6986 of file chan_sip.c.
References AST_CAUSE_BEARERCAPABILITY_NOTAVAIL, AST_CAUSE_BUSY, AST_CAUSE_CALL_REJECTED, AST_CAUSE_CONGESTION, AST_CAUSE_DESTINATION_OUT_OF_ORDER, AST_CAUSE_FACILITY_REJECTED, AST_CAUSE_FAILURE, AST_CAUSE_INTERWORKING, AST_CAUSE_INVALID_NUMBER_FORMAT, AST_CAUSE_NO_ANSWER, AST_CAUSE_NO_ROUTE_DESTINATION, AST_CAUSE_NO_USER_RESPONSE, AST_CAUSE_NORMAL, AST_CAUSE_NORMAL_TEMPORARY_FAILURE, AST_CAUSE_NUMBER_CHANGED, AST_CAUSE_RECOVERY_ON_TIMER_EXPIRE, AST_CAUSE_UNALLOCATED, and AST_CAUSE_USER_BUSY.
Referenced by __transmit_response(), handle_incoming(), handle_response(), and handle_response_invite().
unsigned int port_str2int | ( | const char * | pt, |
unsigned int | standard | ||
) |
converts ascii port to int representation.
converts ascii port to int representation.
Definition at line 3538 of file chan_sip.c.
References ast_strlen_zero.
Referenced by build_peer(), reload_config(), and sip_parse_register_line().