doc for transfer

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@142 8eb893ce-cfd4-0310-b710-fb5ebe64c474
sayer/1.4-spce2.6
Stefan Sayer 20 years ago
parent 7f6d1af4a7
commit 504243f6b1

@ -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;
}
Loading…
Cancel
Save