<p>Kamailio version: 5.1.6 (x86_64/linux)</p>
<p>cfgtrace reports strange call route flow going back and forward from the parent route.<br>
For example, if the cfg file looks like the following:</p>
<p>###############################################<br>
loadmodule "cfgt.so"<br>
modparam("cfgt", "mask", 30)<br>
modparam("cfgt", "basedir", "/tmp/cfgtest/")<br>
loadmodule "debugger.so"<br>
modparam("debugger", "cfgtrace", 1)<br>
modparam("debugger", "mod_level_mode", 1)<br>
modparam("debugger", "mod_hash_size", 4)<br>
modparam("debugger", "mod_level", "core=3")<br>
modparam("debugger", "cfgtest", 1)</p>
<p>request_route<br>
{<br>
route(ENTRY);<br>
route(TEST_1);<br>
}<br>
route[ENTRY]<br>
{<br>
xlog("L_NOTICE", "New request\n");<br>
}<br>
route[TEST_2]<br>
{<br>
xlog("L_NOTICE", "End\n");<br>
}<br>
route[TEST_1]<br>
{<br>
xlog("L_NOTICE", "I'm here\n");<br>
if(is_method("BYE"))<br>
{<br>
xlog("L_NOTICE", "I'm here, again\n");<br>
route(TEST_2);<br>
}<br>
xlog("L_NOTICE", "I'm still here\n");<br>
return;<br>
}<br>
###############################################</p>
<p>If I send an INVITE message, I get the following cfgtrace:</p>
<p>DEBUG:  [core/parser/msg_parser.c:89]: get_hdr_field(): found end of header<br>
ERROR: *** cfgtrace:request_route=[DEFAULT_ROUTE] c=[/etc/kamailio/proxy/kamailio.cfg] l=472 a=5 n=route<br>
ERROR: *** cfgtrace:request_route=[ENTRY] c=[/etc/kamailio/proxy/kamailio.cfg] l=479 a=26 n=xlog<br>
NOTICE: <script>: New request<br>
ERROR: *** cfgtrace:request_route=[DEFAULT_ROUTE] c=[/etc/kamailio/proxy/kamailio.cfg] l=474 a=5 n=route<br>
ERROR: *** cfgtrace:request_route=[TEST_1] c=[/etc/kamailio/proxy/kamailio.cfg] l=489 a=26 n=xlog<br>
NOTICE: <script>: I'm here<br>
ERROR: *** cfgtrace:request_route=[DEFAULT_ROUTE] c=[/etc/kamailio/proxy/kamailio.cfg] l=497 a=16 n=if<br>
ERROR: *** cfgtrace:request_route=[TEST_1] c=[/etc/kamailio/proxy/kamailio.cfg] l=491 a=25 n=is_method<br>
ERROR: *** cfgtrace:request_route=[DEFAULT_ROUTE] c=[/etc/kamailio/proxy/kamailio.cfg] l=497 a=26 n=xlog<br>
NOTICE: <script>: I'm still here<br>
ERROR: *** cfgtrace:request_route=[DEFAULT_ROUTE] c=[/etc/kamailio/proxy/kamailio.cfg] l=499 a=2 n=return<br>
DEBUG:  [core/receive.c:298]: receive_msg(): request-route executed in: 395 usec</p>
<p>As you see some actions are assigned to route "DEFAULT_ROUTE" even if they are in TEST_1.</p>
<p>The issue completely disappear if I remove "route(TEST_2);" line inside the IF.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1668">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZfADxUrzCUKDQJd0c0HmtvKG2uQEks5uh3RZgaJpZM4XKZZl">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZRYwI-WF4zlqHvgTmPxJh_t6SGIjks5uh3RZgaJpZM4XKZZl.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"cfgtrace reports strange call route (#1668)"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1668"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/1668",
"url": "https://github.com/kamailio/kamailio/issues/1668",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "cfgtrace reports strange call route (#1668)",
"sections": [
{
"text": "",
"activityTitle": "**Marco Capetta**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@marcocapetta",
"facts": [
{
"name": "Repository: ",
"value": "kamailio/kamailio"
},
{
"name": "Issue #: ",
"value": 1668
}
]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"kamailio/kamailio\",\n\"issueId\": 1668,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close issue",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"kamailio/kamailio\",\n\"issueId\": 1668\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/kamailio/kamailio/issues/1668"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 388601445\n}"
}
],
"themeColor": "26292E"
}
]</script>