Add accessor to public contact used by belle_sip_refresher

parent 562bef37
......@@ -101,6 +101,11 @@ BELLESIP_EXPORT const belle_sip_list_t* belle_sip_refresher_get_auth_events(cons
**/
BELLESIP_EXPORT void belle_sip_refresher_enable_manual_mode(belle_sip_refresher_t *refresher, int enabled);
/**
* Retrieve last know public ip:port contact used.
**/
BELLESIP_EXPORT char* belle_sip_refresher_get_public_uri(belle_sip_refresher_t* refresher);
BELLE_SIP_END_DECLS
#endif /* REFRESHER_HELPER_H_ */
This diff is collapsed.
......@@ -46,8 +46,8 @@ typedef enum belle_sip_channel_state{
const char * belle_sip_channel_state_to_string(belle_sip_channel_state_t state);
/**
* belle_sip_channel_t is an object representing a single communication channel ( socket or file descriptor),
* unlike the belle_sip_listening_point_t that can owns several channels for TCP or TLS (incoming server child sockets or
* belle_sip_channel_t is an object representing a single communication channel ( socket or file descriptor),
* unlike the belle_sip_listening_point_t that can owns several channels for TCP or TLS (incoming server child sockets or
* outgoing client sockets).
**/
typedef struct belle_sip_channel belle_sip_channel_t;
......@@ -167,6 +167,7 @@ int belle_sip_channel_is_reliable(const belle_sip_channel_t *obj);
const char * belle_sip_channel_get_transport_name(const belle_sip_channel_t *obj);
const char * belle_sip_channel_get_transport_name_lower_case(const belle_sip_channel_t *obj);
char *belle_sip_channel_get_public_ip_port(belle_sip_channel_t *obj);
const struct addrinfo * belle_sip_channel_get_peer(belle_sip_channel_t *obj);
......
......@@ -686,3 +686,6 @@ void belle_sip_refresher_enable_manual_mode(belle_sip_refresher_t *refresher, in
refresher->manual=enabled;
}
char *belle_sip_refresher_get_public_uri(belle_sip_refresher_t* refresher) {
return belle_sip_channel_get_public_ip_port(refresher->transaction->base.channel);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment