diff options
Diffstat (limited to 'res')
-rw-r--r-- | res/res_pjsip.c | 2 | ||||
-rw-r--r-- | res/res_pjsip/pjsip_options.c | 4 | ||||
-rw-r--r-- | res/res_pjsip_outbound_publish.c | 2 | ||||
-rw-r--r-- | res/res_pjsip_outbound_registration.c | 13 | ||||
-rw-r--r-- | res/res_pjsip_pubsub.c | 1 |
5 files changed, 16 insertions, 6 deletions
diff --git a/res/res_pjsip.c b/res/res_pjsip.c index 9782cc997..810b6d329 100644 --- a/res/res_pjsip.c +++ b/res/res_pjsip.c @@ -349,7 +349,7 @@ </description> </configOption> <configOption name="outbound_proxy"> - <synopsis>Proxy through which to send requests, a full SIP URI must be provided</synopsis> + <synopsis>Full SIP URI of the outbound proxy used to send requests</synopsis> </configOption> <configOption name="rewrite_contact"> <synopsis>Allow Contact header to be rewritten with the source IP address-port</synopsis> diff --git a/res/res_pjsip/pjsip_options.c b/res/res_pjsip/pjsip_options.c index 6fd3c2575..662166c89 100644 --- a/res/res_pjsip/pjsip_options.c +++ b/res/res_pjsip/pjsip_options.c @@ -1250,8 +1250,8 @@ int ast_sip_format_contact_ami(void *obj, void *arg, int flags) if (!ast_strlen_zero(contact->call_id)) { ast_str_append(&buf, 0, "CallID: %s\r\n", contact->call_id); } - ast_str_append(&buf, 0, "Status: %s\r\n", ast_sip_get_contact_status_label(status->status)); - if (status->status == UNKNOWN) { + ast_str_append(&buf, 0, "Status: %s\r\n", ast_sip_get_contact_status_label(status ? status->status : UNKNOWN)); + if (!status || status->status == UNKNOWN) { ast_str_append(&buf, 0, "RoundtripUsec: N/A\r\n"); } else { ast_str_append(&buf, 0, "RoundtripUsec: %" PRId64 "\r\n", status->rtt); diff --git a/res/res_pjsip_outbound_publish.c b/res/res_pjsip_outbound_publish.c index 53eb6aca7..a19a9bb24 100644 --- a/res/res_pjsip_outbound_publish.c +++ b/res/res_pjsip_outbound_publish.c @@ -69,7 +69,7 @@ </description> </configOption> <configOption name="outbound_proxy" default=""> - <synopsis>SIP URI of the outbound proxy used to send publishes</synopsis> + <synopsis>Full SIP URI of the outbound proxy used to send publishes</synopsis> </configOption> <configOption name="server_uri"> <synopsis>SIP URI of the server and entity to publish to</synopsis> diff --git a/res/res_pjsip_outbound_registration.c b/res/res_pjsip_outbound_registration.c index 683642f77..538967ea7 100644 --- a/res/res_pjsip_outbound_registration.c +++ b/res/res_pjsip_outbound_registration.c @@ -96,7 +96,7 @@ </description> </configOption> <configOption name="outbound_proxy" default=""> - <synopsis>Outbound Proxy used to send registrations</synopsis> + <synopsis>Full SIP URI of the outbound proxy used to send registrations</synopsis> </configOption> <configOption name="retry_interval" default="60"> <synopsis>Interval in seconds between retries if outbound registration is unsuccessful</synopsis> @@ -1211,6 +1211,17 @@ static int sip_outbound_registration_regc_alloc(void *data) return -1; } + if (!ast_strlen_zero(registration->outbound_proxy)) { + pj_strdup2_with_null(pool, &tmp, registration->outbound_proxy); + uri = pjsip_parse_uri(pool, tmp.ptr, tmp.slen, 0); + if (!uri) { + ast_log(LOG_ERROR, "Invalid outbound proxy URI '%s' specified on outbound registration '%s'\n", + registration->outbound_proxy, ast_sorcery_object_get_id(registration)); + pjsip_endpt_release_pool(ast_sip_get_pjsip_endpoint(), pool); + return -1; + } + } + pjsip_endpt_release_pool(ast_sip_get_pjsip_endpoint(), pool); diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c index 709dc6640..e90502485 100644 --- a/res/res_pjsip_pubsub.c +++ b/res/res_pjsip_pubsub.c @@ -1456,7 +1456,6 @@ static int sub_persistence_recreate(void *obj) ast_log(LOG_WARNING, "Failed recreating '%s' subscription: The endpoint was not found\n", persistence->endpoint); ast_sorcery_delete(ast_sip_get_sorcery(), persistence); - ao2_ref(endpoint, -1); return 0; } |