diff options
author | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-06-16 22:31:42 +0000 |
---|---|---|
committer | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-06-16 22:31:42 +0000 |
commit | afa8b25ae9862c7b35b6821261f45db6769a9278 (patch) | |
tree | 07162465819da53fc8e4dcf4de137d4ac56b7fbc | |
parent | ead89445f73e8edaeb9b99299cf42e41a291f71f (diff) |
Merged revisions 201223 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r201223 | dvossel | 2009-06-16 17:29:30 -0500 (Tue, 16 Jun 2009) | 2 lines
fix issue with build_contact introduced by the "SIP trasnport type issues" commit
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@201226 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_sip.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 25e01bab4..eb6383ef2 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -8949,14 +8949,14 @@ static void build_contact(struct sip_pvt *p) /* only add port if it's non-standard for the transport type */ if (!sip_standard_port(p->socket.type, ourport)) { if (p->socket.type == SIP_TRANSPORT_UDP) - ast_string_field_build(p, our_contact, "<sip:%s%s%s:%d>", p->exten, S_OR(p->exten, "@"), ast_inet_ntoa(p->ourip.sin_addr), ourport); + ast_string_field_build(p, our_contact, "<sip:%s%s%s:%d>", p->exten, ast_strlen_zero(p->exten) ? "" : "@", ast_inet_ntoa(p->ourip.sin_addr), ourport); else - ast_string_field_build(p, our_contact, "<sip:%s%s%s:%d;transport=%s>", p->exten, S_OR(p->exten, "@"), ast_inet_ntoa(p->ourip.sin_addr), ourport, get_transport(p->socket.type)); + ast_string_field_build(p, our_contact, "<sip:%s%s%s:%d;transport=%s>", p->exten, ast_strlen_zero(p->exten) ? "" : "@", ast_inet_ntoa(p->ourip.sin_addr), ourport, get_transport(p->socket.type)); } else { if (p->socket.type == SIP_TRANSPORT_UDP) - ast_string_field_build(p, our_contact, "<sip:%s%s%s>", p->exten, S_OR(p->exten, "@"), ast_inet_ntoa(p->ourip.sin_addr)); + ast_string_field_build(p, our_contact, "<sip:%s%s%s>", p->exten, ast_strlen_zero(p->exten) ? "" : "@", ast_inet_ntoa(p->ourip.sin_addr)); else - ast_string_field_build(p, our_contact, "<sip:%s%s%s;transport=%s>", p->exten, S_OR(p->exten, "@"), ast_inet_ntoa(p->ourip.sin_addr), get_transport(p->socket.type)); + ast_string_field_build(p, our_contact, "<sip:%s%s%s;transport=%s>", p->exten, ast_strlen_zero(p->exten) ? "" : "@", ast_inet_ntoa(p->ourip.sin_addr), get_transport(p->socket.type)); } } |