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.
route {
# initial invite
if (is_method("INVITE")) {
create_dialog();
route(early_media);
exit;
}
} 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();
append_to_reply("Contact:
<sip:$rU@$socket_in(ip):$socket_in(port);transport=udp;did=$DLG_did>\r\n");
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;
} }
I don’t know if Kevin example was with creating a dialog, but I also
noticed this problem through transaction... thanks
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users