diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 4c63ffe159..223e2276cb 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -6150,7 +6150,7 @@ static int respprep(struct sip_request *resp, struct sip_pvt *p, const char *msg add_header(resp, "Contact", p->our_contact); } - if (p->url) { + if (!ast_strlen_zero(p->url)) { add_header(resp, "Access-URL", p->url); ast_string_field_free(p, url); } @@ -6260,7 +6260,7 @@ static int reqprep(struct sip_request *req, struct sip_pvt *p, int sipmethod, in if (!ast_strlen_zero(p->rpid)) add_header(req, "Remote-Party-ID", p->rpid); - if (p->url) { + if (!ast_strlen_zero(p->url)) { add_header(req, "Access-URL", p->url); ast_string_field_free(p, url); }