strip_uri -> sofia_glue_strip_uri
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13724 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
41a478c0d0
commit
6970541683
|
@ -832,6 +832,7 @@ const char *sofia_glue_transport2str(const sofia_transport_t tp);
|
|||
char * sofia_glue_find_parameter(const char *str, const char *param);
|
||||
char *sofia_glue_create_via(switch_core_session_t *session, const char *ip, switch_port_t port, sofia_transport_t transport);
|
||||
char *sofia_glue_create_external_via(switch_core_session_t *session, sofia_profile_t *profile, sofia_transport_t transport);
|
||||
char *sofia_glue_strip_uri(const char *str);
|
||||
int sofia_glue_check_nat(sofia_profile_t *profile, const char *network_ip);
|
||||
int sofia_glue_transport_has_tls(const sofia_transport_t tp);
|
||||
const char *sofia_glue_get_unknown_header(sip_t const *sip, const char *name);
|
||||
|
|
|
@ -844,6 +844,24 @@ char *sofia_glue_create_via(switch_core_session_t *session, const char *ip, swit
|
|||
}
|
||||
}
|
||||
|
||||
char *sofia_glue_strip_uri(const char *str)
|
||||
{
|
||||
char *p;
|
||||
char *r;
|
||||
|
||||
if ((p = strchr(str, '<'))) {
|
||||
p++;
|
||||
r = strdup(p);
|
||||
if ((p = strchr(r, '>'))) {
|
||||
*p = '\0';
|
||||
}
|
||||
} else {
|
||||
r = strdup(str);
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
int sofia_glue_check_nat(sofia_profile_t *profile, const char *network_ip)
|
||||
{
|
||||
return (network_ip &&
|
||||
|
|
|
@ -49,24 +49,6 @@ static int get_call_id_callback(void *pArg, int argc, char **argv, char **column
|
|||
return 0;
|
||||
}
|
||||
|
||||
char *strip_uri(const char *str)
|
||||
{
|
||||
char *p;
|
||||
char *r;
|
||||
|
||||
if ((p = strchr(str, '<'))) {
|
||||
p++;
|
||||
r = strdup(p);
|
||||
if ((p = strchr(r, '>'))) {
|
||||
*p = '\0';
|
||||
}
|
||||
} else {
|
||||
r = strdup(str);
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
void sofia_sla_handle_register(nua_t *nua, sofia_profile_t *profile, sip_t const *sip, long exptime, const char *full_contact)
|
||||
{
|
||||
nua_handle_t *nh = NULL;
|
||||
|
@ -74,7 +56,7 @@ void sofia_sla_handle_register(nua_t *nua, sofia_profile_t *profile, sip_t const
|
|||
char my_contact[256] = "";
|
||||
char *sql;
|
||||
struct sla_helper sh = { { 0 } };
|
||||
char *contact_str = strip_uri(full_contact);
|
||||
char *contact_str = sofia_glue_strip_uri(full_contact);
|
||||
sofia_transport_t transport = sofia_glue_url2transport(sip->sip_contact->m_url);
|
||||
char network_ip[80];
|
||||
int network_port = 0;
|
||||
|
@ -235,7 +217,7 @@ void sofia_sla_handle_sip_r_subscribe(int status,
|
|||
char *full_contact = sip_header_as_string(nua_handle_home(nh), (void *) sip->sip_contact);
|
||||
time_t expires = switch_epoch_time_now(NULL);
|
||||
char *sql;
|
||||
char *contact_str = strip_uri(full_contact);
|
||||
char *contact_str = sofia_glue_strip_uri(full_contact);
|
||||
|
||||
if (sip && sip->sip_expires) {
|
||||
expires += sip->sip_expires->ex_delta + 30;
|
||||
|
|
Loading…
Reference in New Issue