<h3>Description</h3>
<p>Using xmlrpc command to generate the bye using terminate_dlg request:</p>

<h3>Troubleshooting</h3>
<h4>Reproduction</h4>
<p>use xmlrpc request to terminate the dialog</p>
<pre><code>curl --data @xmlrpc http://13.57.122.212:8080/RPC
</code></pre>
<p>xmlrpc file will have following things</p>
<pre><code><?xml version="1.0"?>
<methodCall>
<methodName>dlg.terminate_dlg</methodName>
<params>
<param><value><string>fe6361a2-52f0-1237-e5a2-06119108e458</string></value></param>
<param><value><string>07322vj6a8taa</string></value></param>
<param><value><string>gK09f669d8</string></value></param>
</params>
</methodCall>
</code></pre>

<h4>Debugging Data</h4>

<pre><code>(paste your debugging data here)
</code></pre>
<h4>Log Messages</h4>

<pre><code>(paste your log messages here)
</code></pre>
<h4>SIP Traffic</h4>

<pre><code>**Bye message without xmlrpc**
BYE sip:gw+plivo.com@13.57.90.158:5080;transport=tcp;transport=tcp;gw=plivo.com;alias=13.57.90.158~49325~2 SIP/2.0.
Record-Route: <sip:13.57.122.212;lr;ftag=gK07d4ffc2>.
Record-Route: <sip:18.214.109.132:5060;lr;ftag=gK07d4ffc2>.
Via: SIP/2.0/UDP 13.57.122.212:5060;branch=z9hG4bK154c.8fa2a8729a68989c41230f0906bcd2bd.0.
Via: SIP/2.0/UDP 18.214.109.132:5060;rport=5060;branch=z9hG4bK154c.44759fe4.0.
Via: SIP/2.0/UDP 81.52.176.68:5060;branch=z9hG4bK07Badb05d2bebab0ac9.
From: <sip:+919967609476@81.52.176.68>;tag=gK07d4ffc2.
To: "919967609476" <sip:+919967609476@54.183.206.134>;tag=5SDBNUapcZv5m.
Call-ID: 237f21f0-52db-1237-e5a2-06119108e458.
CSeq: 29061 BYE.
Max-Forwards: 68.
Route: <sip:54.183.206.134:5060;r2=on;lr;ftag=5SDBNUapcZv5m;nat=yes>.
Route: <sip:54.183.206.134:5060;transport=tcp;r2=on;lr;ftag=5SDBNUapcZv5m;nat=yes>.
Reason: Q.850;cause=16.
Content-Length: 0.
..

**Bye message using xmlrpc request**
U 172.31.4.160:5060 -> 54.183.206.134:5060
BYE sip:gw+plivo.com@13.57.90.158:5080;transport=tcp;transport=tcp;gw=plivo.com SIP/2.0.
Via: SIP/2.0/UDP 13.57.122.212:5060;branch=z9hG4bK7841.79765615000000000000000000000000.0.
To: <sip:suren1002170622114516@54.183.206.134>;tag=Hv494Z9D8D9rH.
From: <sip:919967609476@54.183.206.134>;tag=gK0cf13bdd.
CSeq: 1 BYE.
Call-ID: 56783745-52ef-1237-e5a2-06119108e458.
Route: <sip:54.183.206.134:5060;r2=on;lr;ftag=Hv494Z9D8D9rH;nat=yes>, <sip:54.183.206.134;transport=tcp;r2=on;lr;ftag=Hv494Z9D8D9rH;nat=yes>.
Content-Length: 0.
User-Agent: kamailio (5.1.4 (x86_64/linux)).
Max-Forwards: 70.
..
</code></pre>
<h3>Possible Solutions</h3>

<h3>Additional Information</h3>
<ul>
<li><strong>Kamailio Version</strong> - output of <code>kamailio -v</code></li>
</ul>
<pre><code>root@ip-172-31-4-160:/etc/kamailio# kamailio -version
version: kamailio 5.1.4 (x86_64/linux) 6ebfda
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 6ebfda 
compiled on 11:48:26 Sep  7 2018 with gcc 4.8.4
</code></pre>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>

<pre><code>root@ip-172-31-4-160:/etc/kamailio# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.5 LTS
Release:        14.04
Codename:       trusty

root@ip-172-31-4-160:/etc/kamailio# uname -a
Linux ip-172-31-4-160 3.13.0-143-generic #192-Ubuntu SMP Tue Feb 27 10:45:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
</code></pre>

<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/1689">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZV17ikut3CL4H8rF4Tjk3IWzkuBnks5uoawPgaJpZM4X6JeI">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36Zb55bKgCbTSt8a1oUrlSnM8wNHVgks5uoawPgaJpZM4X6JeI.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":"when using terminate_dlg via xmlrpc, not able to generate proper bye message, if request is behind nat. (#1689)"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1689"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/1689",
"url": "https://github.com/kamailio/kamailio/issues/1689",
"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": "when using terminate_dlg via xmlrpc, not able to generate proper bye message, if request is behind nat. (#1689)",
"sections": [
{
"text": "",
"activityTitle": "**Surendra Tiwari**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@surendratiwari3",
"facts": [
{
"name": "Repository: ",
"value": "kamailio/kamailio"
},
{
"name": "Issue #: ",
"value": 1689
}
]
}
],
"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\": 1689,\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\": 1689\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/kamailio/kamailio/issues/1689"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 401119112\n}"
}
],
"themeColor": "26292E"
}
]</script>