Dear all,
Has anybody installed ser with sems and isdngw?
I checked the website and i found out a conf file (berlios) but has problems when it calls the vm module.
The CAPI works fine with Asterisk PBX, but i prefer ser in order to develop more advanced hybrid services (HOLD, TRANSFER etc).
Attached you can find the conf files.
Thanks in advance Sotiris
# $Id: isdngw.conf.sample,v 1.5 2003/11/16 19:24:56 ullstar Exp $ # # # Copyright (C) 2003 Ulrich Abend # # This file is part of isdngw, a free isdn gateway plugin # for sems, a free SIP media server. # # isdngw is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version # # For a license to use the ser software under conditions # other than those described here, or to purchase support for this # software, please contact iptel.org by e-mail at the following addresses: # info@iptel.org # # isdngw is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # # isdngw.conf.sample # # ISDN Gateway Application Module for Sip Express Media Server (sems) # # sample configuration file # # # whitespaces (spaces and tabs) are ignored # comments start with a "#" and may be used inline # # example: option=value1, value2 # i like this option # # this file must be referenced in the global sems configuration file: # # sems.conf: # # isdngw module configuration (external file) # config.isdngw=/etc/isdngw.conf #
############################################################################### # backend selection: # # # # isdngw supports the classical isdn4linux standard by accessing the # # /dev/ttyI* devices as well as CAPI 2.0 based drivers. You can mix both # # technologies, e.g. using your classic fritzCard PCI with isdn4linux drivers # # and your C4 card with CAPI. # # # ###############################################################################
# required parameter: enablei4l=< yes | no > # # enable I4L support? # For isdn4linux support, you need # - the linux kernel drivers for i4l loaded # - read/write permissions for sems user on (some) /dev/ttyI* devices # - you can (for whatever reason) use the "capidrv" kernel module # to use CAPI based cards with I4L (this is not recommended though) enablei4l=no
# required parameter: enablecapi=< yes | no > # # enable CAPI20 support? # For CAPI support you need # - a sems compiled with CAPI support (-DUSE_CAPI20 uncommented in Makefile) # - the capi20 libraries from the isdn4k package properly installed # - the kernel capi drivers loaded (run capiinfo to check!) # CAPI20 support is experimental, tested with AVM FritzCard PCIV2 and C4 enablecapi=yes
############################################################################### # i4l backend configuration: # # # # If you enabled isdn4linux backend support above, you can configure the # # according parameters here. # # Backend selection for in- and outgoing calls is done according to your # # configuration. If a call matches the configuration of multiple backends # # the device selection is non-deterministic. # # # ###############################################################################
# optional parameter: i4l_numoutdevices=<number of devices to be used> # # - specifies how many ttyI* devices to use for outgoing telephony calls # - devices must be fully accessible by the vm process' user # - this number also specified the maximum number of simultaneous # outgoing phone calls (if not otherwise restricted) # - you must specify exactly one parameter of i4l_numoutdevices and i4l_outdevices, not both i4l_numoutdevices=5
# optional parameter: i4l_outdevices=<dev1>, <dev2>, <dev3>, ... # # - specifies which ttyI* devices to use for outgoing telephony calls # - devices must be fully accessible by the vm process' user # - the number of devices listed is the maximum of simultaneous # outgoing phone calls (if not otherwise restricted) # - you may not set i4l_numoutdevices if this parameter is set # - e.g. i4l_outdevices=/dev/ttyI10, /dev/ttyI11, /dev/ttyI12 i4l_outdevices=
# optional parameter: i4l_numindevices=<number of devices used> # # - specifies how many ttyI* devices to use for incoming telephony calls # - devices must be fully accessible by the sems process' user # - the number of devices listed is also the maximum of simultaneous # incoming phone calls (if not otherwise restricted) # - you may specify only i4l_numindevices OR i4l_indevices, not both. i4l_numindevices=5
# optional parameter: i4l_indevices=<dev1>, <dev2>, <dev3>, ... # # - specifies which ttyI* devices to use for incoming telephony calls # - devices must be fully accessible by the vm process' user # - the number of devices listed is the maximum of simultaneous # incoming phone calls (if not otherwise restricted) # - you may specify only i4l_numindevices OR i4l_indevices, not both. # - e.g. i4l_indevices=/dev/ttyI13, /dev/ttyI14 i4l_indevices=
# optional parameter: i4l_lockdir=/where/to/store/lockfiles # # - specifies the directory where to put the lockfiles # - may be useful if not run as root # - default: i4l_lockdir=/var/lock i4l_lockdir=/var/lock
# optional parameter: i4l_inmsn=<msn1>, <msn2>, <msn3>, ... # # - specifies the all msn's the i4l backend listens for calls on # - a call is only accepted if the according SIP call is successfully placed # - other ISDN equipment *may* also listen on this numbers, the # first to accept the call is the lucky one then # - IMPORTANT: no other isdn4linux application may bind to any of that numbers # - wildcards may be specified here like 81462* or * # - example: i4l_inmsn=12345, 54321* i4l_inmsn=*
# optional parameter: i4l_mapping=<number1>, <number2>, ... # # - specifies what numbers are called via the isdn4linux backend # - a call is only placed to the PSTN network if it matches one mapping (i4l # or capi controller mapping below) # - wildcards may be specified here like 81462* or * # - A "*" means that all calls are allowed and get routed via i4l i4l_mapping=*
# optional parameter: i4l_numchannel=<number of available b-channels> # # - specifies how many B-channels should be used with isdn4linux backend # - isdngw checks for availability of a channel before trying to route # the call, if another backend allows a connection and i4l has no # more channels available, other backend will be used # - the value does not have to be the real number of channels, you can # limit the max number of simulatenous connections with this parameter # - if this parameter is omitted, isdngw tries to detect this number # by accessing /dev/isdninfo, this fails if capidrv is used or the # user running sems does not have read permissions on this device i4l_numchannel=
############################################################################### # CAPI 2.0 backend configuration: # # # # If you enabled capi backend support above, you can configure the # # according parameters here. # # Backend selection for in- and outgoing calls is done according to your # # configuration. If a call matches the configuration of multiple backends # # the device selection is non-deterministic. # # # ###############################################################################
# optional parameter: capi_inmsn=<msn1>, <msn2>, <msn3>, ... # # - specifies the all msn's the capi backend listens for calls on, this # setting is per controller based # - cards with multiple interfaces supply multiple # (virtual) controllers (e.g. AVM c4 supplies controller 1 to 4) # - you can use the capiinfo utility to see what controllers are available # - a call is only accepted if the according SIP call is successfully placed # - other ISDN equipment *may* also listen on this numbers, the # first to accept the call is the lucky one then # - wildcards may be specified here like 81462* or * # - isdngw currently supports up to 8 controllers # - example: capi_inmsn=12345, 54321* capi_1_inmsn=* capi_2_inmsn=* capi_3_inmsn=* capi_4_inmsn=* capi_5_inmsn=* capi_6_inmsn=* capi_7_inmsn=* capi_8_inmsn=*
# optional parameter: capi_<ctrlnumber>_mapping=<number1>, <number2>, ... # # - specifies what numbers are called via each capi based controller backend # - this parameter must be specified for every controller to be used # (first controller: "capi_1_mapping" second controller: "capi_2_mapping" # - a call is only placed to the PSTN network if it matches one mapping (i4l # or capi controller mapping below) # - wildcards may be specified here like 81462* or * # - A "*" means that all calls are allowed and get routed via the specified # capi controller # - if multiple expressions match the longest wins, e.g. if controller 1 # handles 12345* and controller 2 handles 1*, controller 1 gets the calla # to 1234567 # - if you use the same expression for two or more controllers, the lower # controller number is tried first, if no line is available the other(s) # is tried. In case of other errors, the call is not tried more than once. # - isdngw currently supports up to 8 controllers # - example: # capi_1_mapping=0* # capi_2_mapping=8*, 9* # capi_3_mapping=1*, 2*, 3*, 4*, 5*, 6*, 7* capi_1_mapping=* capi_2_mapping=* capi_3_mapping=* capi_4_mapping=* capi_5_mapping=* capi_6_mapping=* capi_7_mapping=* capi_8_mapping=*
# optional parameter: capi_<ctrlnumber>_numchannel=<number of available channels> # # - specifies how many B-channels should be used with each CAPI controller # - the value does not have to be the real number of channels, you can # limit the max number of simulatenous connections with this parameter # - if this parameter is omitted, isdngw detects the number of available # channels automatically # - example: # capi_1_numchannel=1 # capi_2_numchannel=1 # capi_3_numchannel= capi_1_numchannel= capi_2_numchannel= capi_3_numchannel= capi_4_numchannel= capi_5_numchannel= capi_6_numchannel= capi_7_numchannel= capi_8_numchannel=
############################################################################### # SIP configuration: # # # # Configure all SIP related settings here. # # # ###############################################################################
# optional parameter: msnsipcaller=< yes | no > # # - specifies if the SIP caller username should be used as # outgoing msn (works only if SIP caller userpart is e164 style number) # - defaults to yes msnsipcaller=no
# optional parameter: outmsn=<msn> # # - specifies the default msn for outgoing calls # - if msnsipcallee is set to "yes" this number is only used, # if SIP caller userpart is not e164 compliant # - if 0 is used, the number used depends on the configuration # of the PSTN telephony system defaultmsn=0
# required parameter: callerdomain=<domainname> # # - specifies the domainname that is used as initiator of the SIP calls # - the caller address is composed as follows: # <calling-number>@<callerdomain> #callerdomain=mycaller.domain.com #SSAL_ADITION callerdomain=146.124.2.235
# required parameter: calleedomain=<domainname> # # - specifies the domainname that is used as destination of the SIP calls # - the callee address is composed as follows: # <called-number>@<calleedomain> #calleedomain=mycallee.domain.com calleedomain=146.124.2.235
############################################################################### # misc configuration: # # # # Other configuration options follow. # # # ###############################################################################
# optional parameter: clip=< yes | no > # # - specifies whether Caller LIne Representation should be used # - no means hide caller number, yes means show caller number # - this works for CAPI but not for i4l, behaviour of i4l depends on # the configuration of the telephony system # - defaults to yes clip=
# optional parameter: minnumberlen=<minimum lenght of number> # # - specifies the minimum number of digits on an outgoing call # - shorter numbers are rejected # - defaults to 4 minnumberlen=
# optional parameter: outlogfile=<file> # # - specifies a log file, where all calls are listed # - WARNING: this function is unimplemented yet! outlogfile=
# end of file.
# $Id: sems.conf.sample,v 1.1.2.1 2003/08/28 19:13:25 rco Exp $ # # sems.conf.sample # # Sip Express Media Server (sems) # # sample configuration file # # # whitespaces (spaces and tabs) are ignored # comments start with a "#" and may be used inline # # example: option=value1, value2 # i like this option #
################################## # global parameters # ##################################
# optional parameter: fork={yes|no} # # - specifies if sems should run in daemon mode (background) fork=yes
# optional parameter: stderr={yes|no} # # - debug mode: do not fork and log to stderr stderr=no
# optional parameter: loglevel={0|1|2|3} # # - sets log level (error=0, warning=1, info=2, debug=3) loglevel=1
# optional parameter: fifo_name=<filename> # # - path and file name of our fifo file fifo_name=/tmp/am_fifo
# optional parameter: ser_fifo_name=<filename> # # - path and file name of Ser's fifo file ser_fifo_name=/tmp/ser_fifo
# optional parameter: plugin_path=<path> # # - sets the path to the plug-ins # - may be absolute or relative to CWD plugin_path=/usr/local/lib/sems/plug-in/
################################## # voicemail specific parameters # ##################################
# optional parameter: announce_path=<path> # # - sets the path where announce files are searched for announce_path=/usr/local/lib/sems/audio/
# optional parameter: default_announce=<filename> # # - sets the name of the default announce WAV file default_announce=default_en.wav
# optional parameter: max_record=<seconds> # # - maximum record time max_record=30
# optional parameter: smtp_server=<hostname> # # - sets address of smtp server smtp_server=localhost
# optional parameter: smtp_port=<port> # # - sets port of smtp server smtp_port=25
################################## # module specific parameters # ##################################
# add more module configurations here (inline or external): # # config.mymodule=<filename> # or # config.mymodule=inline # ... # config.mymodule=end #isdngw module configuration (external file) config.isdngw=/root/ser/isdngw.conf
# # $Id: ser-isdngw.conf,v 1.2 2003/09/09 17:48:22 ullstar Exp $ # # isdngw sample config script # please direct comments to ullstar@iptel.org #
# ----------- global configuration parameters ------------------------
# setup parameters according to your needs. Most people will only have # to adjust the listen and alias parameters below.
debug=1 # debug level (cmd line: -dddddddddd) fork=yes
log_stderror=no # (cmd line: -E) check_via=yes # (cmd. line: -v) dns=0 # (cmd. line: -r) rev_dns=0 # (cmd. line: -R) port=5060 children=4 fifo="/tmp/ser_fifo"
# Add the name of your system here #listen=yourhostname # for more names add alias entries, all that might be used as domain in SIP URI #alias=yourhostname.yourdomain.com #alias=your.ip.addr.ess
# ------------------ module loading ----------------------------------
loadmodule "/usr/local/lib/ser/modules/sl.so" loadmodule "/usr/local/lib/ser/modules/tm.so" loadmodule "/usr/local/lib/ser/modules/maxfwd.so" loadmodule "/usr/local/lib/ser/modules/rr.so" loadmodule "/usr/local/lib/ser/modules/textops.so" loadmodule "/usr/local/lib/ser/modules/vm.so" loadmodule "/usr/local/lib/ser/modules/dbtext.so" loadmodule "/usr/local/lib/ser/modules/usrloc.so" loadmodule "/usr/local/lib/ser/modules/registrar.so"
# ----------------- setting module-specific parameters ---------------
# You may want to define things like databases here. Please refer to # the extensive SER documentation for this purpose. Module parameters # are always described in the modules README files. # # For pure isdn gateway functionality only a database is needed, we use # a simple textfile for this purpose. Actually this is only neccessary until # the vm module is reworked. Simply copy the etc/db directory from the isdngw # directory somewhere and specify it in the following statement:
modparam("voicemail", "db_url","/root/ser/db")
# ------------------------- request routing logic -------------------
# This section describes how SIP messages are handled.
# workaround needed for some buggy UAs (e.g. MS Messenger) modparam("rr", "enable_full_lr", 1)
# The routing is described now: route{
# initial sanity checks -- messages with # max_forwars==0, or excessively long requests if (!mf_process_maxfwd_header("10")) { sl_send_reply("483","Too Many Hops"); break; };
# we record-route all messages -- to make sure that # subsequent messages will go through our proxy; that's # particularly good if upstream and downstream entities # use different transport protocol record_route(); # loose-route processing loose_route();
# deal with my domain first if (uri==myself) {
# the following allows for user-agent registration # in concerns of the isdn gateway this means: # register a SIP phone with <telephonenumber>@<this server name> # and configure the isdn gateway to listen on the number specified as # the user (<telephonenumber>). # Incoming calls are then directed to this user agent # Note: This sample configuration does not use a persistent storage, so # if you restart SER you have to re-register your SIP client to make this # work. Refer to the userloc module's documentation for setting up # persistent contact storage. if (method=="REGISTER") { save("location"); break; }; if (lookup("location")) { if (!t_relay()) { sl_reply_error(); }; break; }; # ############################## # # isdngw specific configuration # # ############################## # if(t_newtran()){
if(method=="INVITE" || method=="BYE" || method=="CANCEL"){
# send a response right at the start to avoid retransmissions t_reply("100","Trying -- just wait a minute !");
# isdngw only gets activated on invite requests if(method=="INVITE"){ # isdngw feels to be responsible for numeric userparts # all numbers followed by @ and anything after it match # this expression # for example: sip:555123123@yourdomain.com:5061 matches. # The vm command (from module vm) is used to contact the # media server and though it the isdngw. # /tmp/am_fifo is the fifo filename ued for communications, make # shure the permissions are correct and that the same fifo # filename is defined in sems.conf. if(uri=~"sip:[0-9]+@.*"){ if(!vm("/tmp/am_fifo","isdngw")){ log("could not contact isdngw\n"); t_reply("500","could not contact isdngw"); }; # we dont feel responsible for sip addresses not starting with # a number, so send the right error code. } else { t_reply("404","Not Found"); }; # stop routing here, the message is now processed by the media server break; };
# The following handles the call termination, we must pass these requests # to the media server as follows. Again make shure the fifo name and permissions # are set correctly (like im sems.conf). if((method=="BYE")||(method=="CANCEL")){ if(!vm("/tmp/am_fifo","bye")){ log("could not contact the media server\n"); t_reply("500","could not contact the media server"); }; break; }; # other methods than INVITE, BYE and CANCEL are not handled by this SIP Server # so we sent an error message } else { log("ERROR: method not supported\n"); t_reply("500", "sorry, method not supported"); }; } else { # for any reason the transaction could not be created, send error code log("could not create new transaction\n"); sl_send_reply("500","could not create new transaction"); }; # not uri=myself, this SIP request is not directed to us, simply direct it to its # correct destination } else { if (!t_relay()) { sl_reply_error(); }; }; # end of routing. }