summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2016-12-02 12:27:52 -0600
committerGerrit Code Review <gerrit2@gerrit.digium.api>2016-12-02 12:27:52 -0600
commit2a415187c50e13b9404c5353f56fa004c2d985e3 (patch)
tree65fe383c39da98a16cce9ec1a7daec429fac8585 /channels/chan_sip.c
parentcd5d9d1d693dd45900a34d88ec9c8b1dfa54bc31 (diff)
parent0e157607957387ff211f4fa56eda58846617cb15 (diff)
Merge "res_pjsip/chan_sip: Advertise 'ws' in the SIP URI transport parameter"
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 16d84af6c..44693ef32 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -14158,6 +14158,7 @@ static void build_contact(struct sip_pvt *p, struct sip_request *req, int incomi
char tmp[SIPBUFSIZE];
char *user = ast_uri_encode(p->exten, tmp, sizeof(tmp), ast_uri_sip_user);
int use_sips;
+ char *transport = ast_strdupa(sip_get_transport(p->socket.type));
if (incoming) {
use_sips = uas_sips_contact(req);
@@ -14172,7 +14173,7 @@ static void build_contact(struct sip_pvt *p, struct sip_request *req, int incomi
} else {
ast_string_field_build(p, our_contact, "<%s:%s%s%s;transport=%s>",
use_sips ? "sips" : "sip", user, ast_strlen_zero(user) ? "" : "@",
- ast_sockaddr_stringify_remote(&p->ourip), sip_get_transport(p->socket.type));
+ ast_sockaddr_stringify_remote(&p->ourip), ast_str_to_lower(transport));
}
}