<h3>Description</h3>
<p>Enable dialog module to user choose between INVITE or OPTIONS on send Re-INVITE on keep-alive</p>
<h3>Expected behavior</h3>
<p>Make the dialog keep-alive through INVITE or OPTIONS. A user choice.</p>
<h3>Possible Solutions</h3>
<p>In function dlg_send_ka of dlg_req_within.c:445, provide an option to choose the value from module config var, pv value, dlg flag, etc.</p>
<pre><code>File: dlg_req_within.c

435    /* send keep-alive
436     * dlg - pointer to a struct dlg_cell
437     * dir - direction: the request will be sent to:
438     *               DLG_CALLER_LEG (0): caller
439     *               DLG_CALLEE_LEG (1): callee
440     */
441    int dlg_send_ka(dlg_cell_t *dlg, int dir)
442    {
443     uac_req_t uac_r;
444     dlg_t* di;
445     str met = {"INVITE", 6};
446     int result;
447     dlg_iuid_t *iuid = NULL;
</code></pre>
<h3>Additional Information</h3>
<p>Just for local tests, i changed dlg_req_within.c:445 from {"OPTIONS",7} to {"INVITE",6} and worked like a charm. I don't know if this change will affect other parts of kamailio.<br>
Let me know if this change affect something else.</p>
<p>Thanks.</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/1876">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZYnAqSvVLWv5au0yXP3fpAZURoftks5vSXufgaJpZM4bZpBr">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZdsK24p8S2gUrJTMamnlskG81dYiks5vSXufgaJpZM4bZpBr.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://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"dialog module: option to choose between OPTIONS or INVITE on keep-alive (#1876)"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1876"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/1876",
"url": "https://github.com/kamailio/kamailio/issues/1876",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>