From 504243f6b1b06563544a01e2a02e0baa6537b45f Mon Sep 17 00:00:00 2001 From: Stefan Sayer Date: Sat, 25 Nov 2006 23:38:51 +0000 Subject: [PATCH] doc for transfer git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@142 8eb893ce-cfd4-0310-b710-fb5ebe64c474 --- doc/Readme.announce_transfer | 53 ++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 doc/Readme.announce_transfer diff --git a/doc/Readme.announce_transfer b/doc/Readme.announce_transfer new file mode 100644 index 00000000..592c8086 --- /dev/null +++ b/doc/Readme.announce_transfer @@ -0,0 +1,53 @@ +Announcement then call transfer + +This application plays an announcement and then REFERs the caller +to either the uri configured in P-Refer-To header, or if his is not +configured, the request URI of the first INVITE. + +If refer is not accepted, succeeds, or fails, a BYE is sent. + +Example ser configuration appends: + +#appends: parameter for announce_transfer +modparam( "tm", "tw_append", + "announce_transfer_headers:P-Refer-To=avp[$refer_to]") + +# appends for REFER NOTIFYs +modparam( "tm", "tw_append", + "notify_headers:hdr[Content-Length];hdr[Content-Type];hdr[Event];msg[body]") + +Example of invoking announce_transfer within route: + + if (method != "ACK" && method != "INVITE" + && method != "CANCEL" && method != "INFO" + && method != "NOTIFY" && method != "BYE" ){ + log("unsupported method\n"); + sl_send_reply("500","unsupported method"); + break; + } + + if (method == "NOTIFY") { + if (!t_write_unix("/tmp/sems_sock","announce_transfer/notify_headers")){ + log("could not contact announce_transfer\n"); + t_reply("500","could not contact media server"); + break; + } + break; + } + + if (method == "INVITE") { + avp_write("sip:callme@example.com","$refer_to"); + if (!t_write_unix("/tmp/sems_sock","announce_transfer/announce_transfer_headers")){ + log("could not contact announce_transfer\n"); + t_reply("500","could not contact media server"); + break; + } + break; + } + + if (!t_write_unix("/tmp/sems_sock","announce_transfer")){ + log("could not contact announce_transfer\n"); + t_reply("500","could not contact media server"); + break; + } +