mirror of https://github.com/sipwise/sems.git
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@280 8eb893ce-cfd4-0310-b710-fb5ebe64c474sayer/1.4-spce2.6
parent
3b527c2353
commit
c07ba6ac52
@ -0,0 +1,79 @@
|
||||
# ser for sems configuration
|
||||
#
|
||||
# This is a simple SER configuration for using SER
|
||||
# as SIP stack for SEMS. It passes every message
|
||||
# directly to SEMS.
|
||||
#
|
||||
# Application and application parameters need to be
|
||||
# set in P-App-Name/P-App-Param headers of the INVITE.
|
||||
#
|
||||
# To install SER 0.9.6 for SEMS in /opt/ser-sems,
|
||||
# use the following commands:
|
||||
# wget ftp.iptel.org/pub/sems/ser-0.9.6-sems.tar.gz
|
||||
# tar xzvf ser-0.9.6-sems.tar.gz; cd ser-0.9.6-sems
|
||||
# make install PREFIX=/opt/ser-sems
|
||||
#
|
||||
|
||||
# set listen parameter if you want SEMS to be reachable
|
||||
# from one interface only:
|
||||
# listen=eth0
|
||||
|
||||
#
|
||||
# listen on this port
|
||||
port=5070
|
||||
|
||||
# connection SER->SEMS
|
||||
unix_sock="/tmp/ser_sock"
|
||||
|
||||
# SEMS sends its own signature
|
||||
server_signature=0
|
||||
|
||||
# we only need sl and tm
|
||||
loadmodule "/opt/ser-sems/lib/ser/modules/sl.so"
|
||||
loadmodule "/opt/ser-sems/lib/ser/modules/tm.so"
|
||||
|
||||
# we want provisional replies in SEMS
|
||||
modparam("tm", "pass_provisional_replies", 1)
|
||||
|
||||
# passes "P-App-Name" and
|
||||
# "P-App-Param" headers with the INVITE
|
||||
modparam("tm", "tw_append",
|
||||
"app_headers:hdr[P-App-Name];hdr[P-App-Param]")
|
||||
|
||||
# for DTMF in SIP INFO we need content-length, -type
|
||||
# and body
|
||||
modparam( "tm", "tw_append",
|
||||
"dtmf_info:hdr[Content-Length];hdr[Content-Type];msg[body]")
|
||||
|
||||
# main routing logic
|
||||
route{
|
||||
# make transaction
|
||||
if (!t_newtran()){
|
||||
sl_send_reply("500","could not create transaction");
|
||||
break;
|
||||
}
|
||||
|
||||
# actively absorb ACKs
|
||||
if (method == "ACK") {
|
||||
t_relay();
|
||||
break;
|
||||
}
|
||||
|
||||
# pass everything to SEMS
|
||||
if (method=="INVITE") {
|
||||
if(!t_write_unix("/tmp/sems_sock","sems/app_headers")){
|
||||
log("could not contact sems\n");
|
||||
t_reply("500","could not contact media server");
|
||||
}
|
||||
} else if (method=="INFO") {
|
||||
if(!t_write_unix("/tmp/sems_sock","sems/dtmf_info")){
|
||||
log("could not contact sems\n");
|
||||
t_reply("500","could not contact media server");
|
||||
}
|
||||
} else { # no need for special appends
|
||||
if(!t_write_unix("/tmp/sems_sock","sems")){
|
||||
log("could not contact sems\n");
|
||||
t_reply("500","could not contact media server");
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in new issue