From: Evgeniy Khramtsov Date: Fri, 30 May 2014 19:49:34 +0000 (+0400) Subject: Fix previous commit X-Git-Tag: 14.07~93 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2cd17c798821b966d997d6803e6a34e00ed83ecb;p=ejabberd Fix previous commit --- diff --git a/src/mod_sip_proxy.erl b/src/mod_sip_proxy.erl index 185d72afe..7a10671e4 100644 --- a/src/mod_sip_proxy.erl +++ b/src/mod_sip_proxy.erl @@ -45,12 +45,12 @@ route(SIPMsg, _SIPSock, TrID, Pid) -> route(Req, LServer, Opts) -> Req1 = prepare_request(LServer, Req), case connect(Req1, add_certfile(LServer, Opts)) of - {ok, SIPSockets} -> + {ok, SIPSocketsWithURIs} -> lists:foreach( - fun(SIPSocket) -> + fun({SIPSocket, URI}) -> Req2 = add_via(SIPSocket, LServer, Req1), - esip:send(SIPSocket, Req2) - end, SIPSockets); + esip:send(SIPSocket, Req2#sip{uri = URI}) + end, SIPSocketsWithURIs); _ -> error end.