<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Hello everyone, I would like to show my part of the code when playing early media after 200OK, when creating dialogs, I substituted $DLG_did in the contact of my dialog, and received the same $DLG_did for my dialog in ACK, but OpenSIPS also continued to send 200OK , despite having already received an ACK response.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><style type="text/css">p, li { white-space: pre-wrap; }</style></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
route {</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> # initial invite
</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> if (is_method("INVITE")) {</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> create_dialog();</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> route(early_media);</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> exit;
</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> }
</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">}
route[early_media] {
if (has_body("application/sdp")) {
rtpengine_manage();
}
$json(reply) := $rtpquery;
$var(port)=$json_pretty(reply/tags/$ft/medias[0]/streams[0]/local port);
remove_body_part();</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> append_to_reply("Contact: <a class="moz-txt-link-rfc2396E" href="sip:$rU@$socket_in(ip):$socket_in(port);transport=udp;did=$DLG_did"><sip:$rU@$socket_in(ip):$socket_in(port);transport=udp;did=$DLG_did></a>\r\n");
</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> append_to_reply("Content-Type: application/sdp\r\n");
$var(body) = $(rb{re.subst,/(IP4.).*/\1$socket_in(ip)/g});
$var(body) = $(var(body){re.subst,/(audio.)...../\1$var(port)/g});
t_reply_with_body(200, "OK", $var(body));
rtpengine_play_media("call-id=$ci from-tag=$ft file=/etc/rtpengine/media.wav");
async(sleep(10), after_early_media);
}
route[after_early_media] {
if (t_was_cancelled()) {
rtpengine_delete();
exit;
} else {
rtpengine_delete();
sl_send_reply(486,"Busy here");
exit;
}
}
</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">I don’t know if Kevin example was with creating a dialog, but I also noticed this problem through transaction... thanks</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><style type="text/css">p, li { white-space: pre-wrap; }</style><style type="text/css">p, li { white-space: pre-wrap; }</style></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><style type="text/css">p, li { white-space: pre-wrap; }</style></p>
<p><style type="text/css">p, li { white-space: pre-wrap; }</style><style type="text/css">p, li { white-space: pre-wrap; }</style></p>
</body>
</html>