<p>´´´</p>
<h1>------------------------- request routing logic -------------------</h1>
<p>request_route {<br>
xlog("L_INFO", "--> Incoming request: $rm from $si to $ru \n$mb\n");</p>
<p># Always try to fix contact alias if needed<br>
if(!set_contact_alias()) {<br>
sl_send_reply("400", "Contact alias failed");<br>
xlog("L_ERR", "---- Contact alias failed: $ct\n");<br>
}<br>
#msg_apply_changes();</p>
<p>if(!t_relay()) {<br>
# Transaction failed, send stateless reply<br>
xlog("L_INFO", " --> Transaction failed. Sending error response. \n");<br>
sl_reply_error();<br>
}<br>
exit;<br>
}</p>
<p>onsend_route<br>
{<br>
xlog("L_INFO", " --->ONSEND from $sndfrom(ip) to $snd(ip) \n$mb\n---\n");<br>
}<br>
´´´</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/kamailio/kamailio/issues/445#issuecomment-165119560">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZbW-BshLhoFEg_OJs7OnFUHBrvkLks5pQWlcgaJpZM4G1vXa.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/kamailio/kamailio/issues/445#issuecomment-165119560"></link>
<meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>