I am currently trying to configure Kamailio and rtpproxy to play back a short message to the user-agent.
I created the necessary sound file using makeann from the source of rtpproxy.
# ----- rtpproxy parameters -----
modparam("rtpproxy", "rtpproxy_sock", "udp:127.0.0.1:7722")
# Validate that the User Agent via IP Authorization via a SQL table
if (!allow_address("1", "$si", "$sp"))
{
sl_send_reply("403", "Forbidden");
xlog("**** $si is UNAUTHORIZIED ****");
exit;
}
xlog("Enter route 1");
if (has_body("application/sdp")) rtpproxy_answer();
if (is_method("INVITE")) {
xlog("New Call for route [ fu=$fu/ tu=$tu /ru=$ru/ ci=$ci]");
if (rtpproxy_offer())
{
t_on_reply("1");
}
else
{
t_on_reply("2");
}
#t_on_branch("2");
#t_on_failure("1");
}
if (!t_relay())
{
sl_reply_error();
}
exit;
}
onreply_route[1] {
if (has_body("application/sdp")) rtpproxy_manage();
rtpproxy_stream2uas("/var/rtpproxy/prompts/connect", "-1");
exit;
}
onreply_route[2] {
if (has_body("application/sdp")) rtpproxy_offer();
exit;
}
When starting Kamailio, it informs me that it found the proxy and it enabled support for it.
May 21 20:44:50 localhost /usr/local/sbin/kamailio[23816]: INFO: rtpproxy [rtpproxy.c:1607]: rtpp_test(): rtp proxy <udp:127.0.0.1:7722> found, support for it enabled
Now, once I start up a call, rtpproxy reports the following information:
May 21 20:14:35 localhost rtpproxy[23379]: INFO:handle_command: new session MTFiNWU1N2NiZGQwNWMwYzVkN2MzZjUyNzhkNTU3YWE., tag 88fc4d50;1 requested, type strong
May 21 20:14:35 localhost rtpproxy[23379]: INFO:handle_command: new session on a port 41236 created, tag 88fc4d50;1
May 21 20:14:35 localhost rtpproxy[23379]: INFO:handle_command: pre-filling caller's address with 10.8.0.10:8000
May 21 20:14:35 localhost /usr/local/sbin/kamailio[23528]: ERROR: <script>: rtpproxy_offer returned true
May 21 20:14:35 localhost /usr/local/sbin/kamailio[23522]: ERROR: rtpproxy [rtpproxy.c:1771]: select_rtpp_node(): script error -no valid set selected
May 21 20:14:35 localhost /usr/local/sbin/kamailio[23522]: ERROR: rtpproxy [rtpproxy_stream.c:113]: rtpproxy_stream(): no available proxies