mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
res_pjsip: add "via_addr", "via_port", "call_id" to contact
As res_pjsip_nat rewrites contact's address, only the last Via header can contain the source address of registered endpoint. Also Call-Id header may contain the source address of registered endpoint. Added "via_addr", "via_port", "call_id" to contact. Added new fields ViaAddress, CallID to AMI event ContactStatus. ASTERISK-26011 Change-Id: I36bcc0bf422b3e0623680152d80486aeafe4c576
This commit is contained in:
@@ -250,6 +250,12 @@ struct ast_sip_contact {
|
||||
char *aor;
|
||||
/*! Asterisk Server name */
|
||||
AST_STRING_FIELD_EXTENDED(reg_server);
|
||||
/*! IP-address of the Via header in REGISTER request */
|
||||
AST_STRING_FIELD_EXTENDED(via_addr);
|
||||
/* Port of the Via header in REGISTER request */
|
||||
int via_port;
|
||||
/*! Content of the Call-ID header in REGISTER request */
|
||||
AST_STRING_FIELD_EXTENDED(call_id);
|
||||
};
|
||||
|
||||
#define CONTACT_STATUS "contact_status"
|
||||
@@ -1101,6 +1107,7 @@ struct ast_sip_contact *ast_sip_location_retrieve_contact(const char *contact_na
|
||||
*/
|
||||
int ast_sip_location_add_contact(struct ast_sip_aor *aor, const char *uri,
|
||||
struct timeval expiration_time, const char *path_info, const char *user_agent,
|
||||
const char *via_addr, int via_port, const char *call_id,
|
||||
struct ast_sip_endpoint *endpoint);
|
||||
|
||||
/*!
|
||||
@@ -1122,6 +1129,7 @@ int ast_sip_location_add_contact(struct ast_sip_aor *aor, const char *uri,
|
||||
*/
|
||||
int ast_sip_location_add_contact_nolock(struct ast_sip_aor *aor, const char *uri,
|
||||
struct timeval expiration_time, const char *path_info, const char *user_agent,
|
||||
const char *via_addr, int via_port, const char *call_id,
|
||||
struct ast_sip_endpoint *endpoint);
|
||||
|
||||
/*!
|
||||
|
Reference in New Issue
Block a user