OpenSIPs Dev Tips: answer a call and play audio with OpenSIPs and rtpengine
Brandon
1 min read
Here is a small snippet, showing how to answer a call and play audio from your opensips config using the opensips b2b_entities module.
if (is_method("INVITE") && !has_totag()) {
xlog("[$fU $tU $ci $rm] initiating ua_session_server_init\n");
ua_session_server_init($var(b2b_key), "ivr");
xlog("[$fU $tU $ci $rm] running rtpengine_answer\n");
rtpengine_answer();
xlog("[$fU $tU $ci $rm] ua_session_reply with '200 OK'\n");
ua_session_reply($var(b2b_key), "INVITE", 200, "OK", $rb);
exit;
}
0
Subscribe to my newsletter
Read articles from Brandon directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by