<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal">I’ll be the first to admit I’m a complete novice to Kamailio, but I’m learning due to necessity. I’m working on setting up Kamailio as a sip proxy (SBC?).<o:p></o:p></p>
<p class="MsoNormal">The desired setup would be for Kamailio to as an external connection point to authenticate the connection and reverse proxy/NAT the rest of the traffic to the asterisk server, hiding internal topology as we go.
<o:p></o:p></p>
<p class="MsoNormal">Right now I’m using dispatcher with NAT and ALIAS to push connections to proxy@{PROXY IP} to proxy@{ASTERISK EXTERNAL IP}.<o:p></o:p></p>
<p class="MsoNormal">I’m running into an issue where a “Message” is being sent, forwarded to the Asterisk server and responded to. Then Asterisk spawns a new call ID “To” the proxy rather than the original requestor which of course gets a 484 response. How
can I somehow associate these two messages and complete the route? <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">MESSAGE sip:proxy@{ASTERISK EXTERNAL IP} SIP/2.0<o:p></o:p></p>
<p class="MsoNormal">Via: SIP/2.0/UDP {PROXY IP}:5060;branch=z9hG4bK0542.4d3d95c66b82f5825d9b90ba7ae88191.0<o:p></o:p></p>
<p class="MsoNormal">Via: SIP/2.0/UDP {CLIENT IP}:37916;received={CLIENT EXTERNAL IP};rport=37916;branch=z9hG4bKPj9b82293b-8ac4-4314-9cb8-d76716746e<o:p></o:p></p>
<p class="MsoNormal">Max-Forwards: 69<o:p></o:p></p>
<p class="MsoNormal">From: <sip:{CLIENT IP}>;tag=8aabdd54-6312-4ba4-bbe4-e713d2cf55a7<o:p></o:p></p>
<p class="MsoNormal">To: <sip:proxy@{PROXY IP}><o:p></o:p></p>
<p class="MsoNormal">Call-ID: 9d7bc193-55d9-479b-8c34-3663c3a8bf3b<o:p></o:p></p>
<p class="MsoNormal">CSeq: 50215 MESSAGE<o:p></o:p></p>
<p class="MsoNormal">Accept: text/plain, application/im-iscomposing+xml<o:p></o:p></p>
<p class="MsoNormal">User-Agent: Digium Android Softphone 4.1.1 (2fccfc8f)<o:p></o:p></p>
<p class="MsoNormal">X-Digium-User-Agent: Digium Android Softphone 4.1.1 (2fccfc8f)<o:p></o:p></p>
<p class="MsoNormal">X-Digium-AppServer-RequestType: Preconfig<o:p></o:p></p>
<p class="MsoNormal">X-Digium-AppServer-Preconfig-Id: ca0175e891557c4e9d6f7314cdbf4044<o:p></o:p></p>
<p class="MsoNormal">X-Digium-Software-Version: 4.1.1 (2fccfc8f)<o:p></o:p></p>
<p class="MsoNormal">X-Digium-AppServer-ID: mobileui0000000004<o:p></o:p></p>
<p class="MsoNormal">Content-Type: text/plain<o:p></o:p></p>
<p class="MsoNormal">Content-Length: 182<o:p></o:p></p>
<p class="MsoNormal">P-hint: outbound<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Message Contents<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">MESSAGE sip:{PROXY IP}:5060 SIP/2.0<o:p></o:p></p>
<p class="MsoNormal">Via: SIP/2.0/UDP {ASTERISK EXTERNAL IP}:5060;rport;branch=z9hG4bKPj6c1bdda3-2b78-4ae2-ac19-5ec2ca8b8928<o:p></o:p></p>
<p class="MsoNormal">From: <sip:proxy@{ASTERISK INTERNAL IP}>;tag=79cb0374-5b41-4550-9158-304a18bb1ee6<o:p></o:p></p>
<p class="MsoNormal">To: <sip:{PROXY IP}><o:p></o:p></p>
<p class="MsoNormal">Contact: <sip:asterisk@{ASTERISK EXTERNAL IP}:5060><o:p></o:p></p>
<p class="MsoNormal">Call-ID: 94c778a4-d3b3-42c1-ac26-25664d9d37bc<o:p></o:p></p>
<p class="MsoNormal">CSeq: 4076 MESSAGE<o:p></o:p></p>
<p class="MsoNormal">X-Digium-AppServer-ResponseType: PreconfigResponse<o:p></o:p></p>
<p class="MsoNormal">X-Digium-AppServer-Password: ofPnRi4Pt/tGqdSYNn97tiO8ju/maPvAsG7ZeESGyUUWUgvF0xlMuhAUDVzJE866dv0+QeOowFTawa6UQJKQsQ==<o:p></o:p></p>
<p class="MsoNormal">X-Digium-AppServer-Session: 471800327353850017<o:p></o:p></p>
<p class="MsoNormal">X-Digium-AppServer-Message-Salt: 85DA16A6C8F17E46<o:p></o:p></p>
<p class="MsoNormal">X-Digium-AppServer-Message-Sequence: 0<o:p></o:p></p>
<p class="MsoNormal">X-Digium-AppServer-ID: mobileui0000000004<o:p></o:p></p>
<p class="MsoNormal">Max-Forwards: 70<o:p></o:p></p>
<p class="MsoNormal">User-Agent: Asterisk PBX 13.1.0-6.7.rl.1516160751.a9f0643<o:p></o:p></p>
<p class="MsoNormal">Content-Type: text/plain<o:p></o:p></p>
<p class="MsoNormal">Content-Length: 600<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">MESSAGE CONTENT<o:p></o:p></p>
</div>
</body>
</html>