[Serusers] Re: Fwd: Re: Hardphone

Ulrich Abend ullstar at iptel.org
Tue Jul 15 10:46:28 CEST 2003


Hi Juan,

I've included a tftp config file for the ATA, you should adopt it to your 
needs, comments inserted are prefixed with "----->", send mail if you have 
problems:

-----> start of config file
#txt -- file must begin with #txt for the formating tool (i.e. cfgfmt.exe).
#       to treat it as text file.
#
# NOTE: 1. # begin at new line is a comment.
#       2. all parameter/value pairs are optional (but may be needed
#          nevertheless for ATA box to function properly if no
#          prior value is being programmed into the ATA box).
#       3. where IVR Access Code is available, one can use either
#          alphanumeric entry method or numeric entry method for
#          specifying the value of the parameter via IVR alternate
#          Interface. When the value is normally specified as hex
#          digits via provisioning, only decimal entry is available
#          in the IVR alternate interface (numeric entry method),
#          so one must covert hex value to decimal value first
#          before manually entering the value via IVR).
#       4. Parameter values can be one of:
#          a. alphanumeric string
#          b. numeric digit string 
#          c. array of short integer
#          d. IP address (e.g. 192.168.2.170)
#          e. Extended IP address -- IP address with Port (e.g.
#               192.168.2.170.9001)
#          f. boolean (1 or 0)
#          g. bitmap value -- unsigned hex integer (for specifying
#               bits in 32bit integer)
#          h. integer (32 bit integer).


-----> set a password for web access here if you want to use webinterface
# ============================= UI Parameters ============================
# UIPassword: alphanumeric string (9 characters max) -- control access to
#       web page or IVR interface. If set to non-zero, then every access
#       to the web page and IVR will require the value of UIPassword
#       being entered.
#   IVR Access Code <7387277>
UIPassword:0

-----> enable configuration via tftp, use a tftp server like 
ftp://ftp.mamalinux.com/pub/atftp/ to easily config your ata
# ======================== Provisioning Parameters =======================
# ------------------------------------------------------------------------
# UseTftp: boolean value -- 1 means use tftp for provisioning;
#       0 means none.
#   IVR Access Code <305>
UseTftp:1

# ------------------------------------------------------------------------
# TftpURL: alphanumeric string (31 characters max) -- a URL, i.e. IP or
#       URL of tftp server to use. This is needed if the DHCP will not
#       give the TFTP address. You can optionally include the path prefix
#       to the Tftp file to download. E.g. If the Tftp server IP address
#       is 192.168.2.170 or wwww.cisco.com, and the path to download the
#       Tftp file is in /ata186, then you can specify the URL as
#       192.168.2.170/ata186 or www.cisco.com/ata186.
#   IVR Access Code <905> -- NOTE: from the IVR, you can only enter IP
#       address, from the web server, you can enter actual URL.
TftpURL:10.0.0.1/ata186

# ------------------------------------------------------------------------
# CfgInterval: integer value -- representing number of seconds.
#       Interval between each configuration update (in case of using
#       tftp for provisioning, every such interval expiration, the box
#       will do another tftp get of its configuration file
#       at the earliest possible time -- when the box is idle).
#       CfgInterval can be set to some random value to achieve
#       random contact interval from individual ATA box to the tftp
#       server.
#   IVR Access Code <80002>
cfgInterval:3600

# ------------------------------------------------------------------------
# EncryptKey: alphanumeric string (8 charaters max) -- 0 means no
#       encryption was made on the incoming profile from tftp server.
#       Other value means that the profile from tftp server is encrypted
#       with this key using rc4 encryption algorithm. The cfgfmt will
#       automatically encrypt the binary file when this parameter has
#       value specified other than 0.
#   IVR Access Code <320>
EncryptKey:0

# ------------------------------------------------------------------------
# ToConfig: boolean value -- 1 if the box is fresh from the factory,
#       otherwise should set the box to 0 once it is configured to have
#       operating configuration.
#   IVR Access Code <80001>
ToConfig:1


# ==================== FirmWare Upgrade Parameters =======================
# ------------------------------------------------------------------------
# upgradecode, upgradelang: special parameter to provide information on
#   how to upgrade firmware code or language image.
#
#   Upgradecode parameter's value should be derived from the following
#   template: 
#
# upgradecode:3,0x301,0x0400,0x0200,tftp_server_ip,69,image_id,image_file_name 
#
#   where the following are site specific fields that need to be modified 
#   accordingly: 
#     1. tftp_server_ip is the TFTP server IP address where the
#        image_file_name can be found; 
#     2. image_id is a unique 32-bit integer value different from upgrade
#        to upgrade. A simple way to derive this 32-bit integer value is to
#        use the build date on the image file name and prepending it with
#        "0x" (e.g. if the image_file_name is ata186-v2-14-020514a.kxz, then
#        the build date is 020508a, and the image_id is 0x020508a). 
#     3. image_file_name is the firmware upgrade image file name. The
#        image_file_name format is 
#           ata186-v{M}-{N}-{yymmdd}{a-f}{ext}
#       - M is major version number 
#       - N is minor version number (always express in 2 digits) 
#       - yymmdd is 2 digit year, 2 digit month, and 2 digit day 
#       - a-f is the build letter 
#       - yymmdd and a-f together form the build date of the image 
#       - ext must be ".kxz" for upgrading from version 2.11 and below,
#         and can be ".zup" for upgrading from version 2.12 and up
#         for ATA186, but it MUST be ".zup" for upgrading ATA188.
#
# e.g.
#upgradecode:3,0x301,0x0400,0x0200,192.168.2.170,69,0x020514a,ata186-v2-14-020514a.kxz
#upgradelang:3,0x301,0x0400,0x0200,192.168.2.170,69,0x020514a,ata186-v2-14-020514a-elang.kbx
#
# NOTE: the default values listed below will not trigger any upgrade.
#
upgradecode:0,0x301,0x0400,0x0200,0.0.0.0,69,0,none
upgradelang:0,0x301,0x0400,0x0200,0.0.0.0,69,0,none


------> Our config used dhcp, if you want a static config, edit the following 
values
# ====================== Operational Parameters ==========================
# ------------------------------------------------------------------------
# Dhcp: boolean value -- where 1 means do DHCP at reset to obtain
#       IP/route/netmask/DNS/NNTP/TFTP etc, and 0 means don't use
#       DHCP, instead use hard coded parameter values.
#   IVR Access Code <20>
Dhcp:1

# ------------------------------------------------------------------------
# staticIp, staticSubNetMask, staticRoute: IP value -- statically assigned
#       ip, subnetmask, and route. This is used if dhcp parameter
#       is not set to 1.
#   IVR Access Code <1> for StaticIp
#   IVR Access Code <2> for StaticRoute
#   IVR Access Code <10> for StaticNetMask
StaticIp:0
StaticRoute:0
StaticNetMask:0

# ------------------------------------------------------------------------
# GkOrProxy: alphanumeric string (31 characters max) -- gatekeeper or
#       proxy ip
#   IVR Access Code <5>
#   Format: Null-terminated alpha-numeric string with up to 31 characters.
#           For SIP Proxy Server, this can be an IP address with or without 
#           a port parameter such as 123.123.110.45, 123.123.110.45.5060, 
#           or 123.123.110.45:5061,  or URL such as sip.cisco.com, 
#           sip.komodo.cisco.com:5061. For IP address, a '.' or ':' can be
#           used to delimit a port parameter. For URL, a ':' must be used 
#           to indicate a port
GkOrProxy:ullstar.homeip.net:5080

# ------------------------------------------------------------------------
# AltGk: alphanumeric string (31 characters max) -- Alternate gatekeeper
#        in H323; or the backup SIP Proxy Server in SIP (this could
#        be a FQDN with optional port parameter in SIP)
#   NOTE: ConnectMode bit 3 (mask 0x8) control whether alternate
#         gatekeeper need to register or not, in H323.
#         In SIP, ATA only registers to the active SIP proxy server
#   IVR Access Code <6>
AltGk:0

# ------------------------------------------------------------------------
# AltGkTimeOut: integer value -- Alternate H323 gatekeeper or SIP proxy
#              server timeout value in seconds. Once timeout, the ATA
#              will try to go back to the primary H323 GK or SIP Proxy
#              Server.
#              In SIP, re-registration will not occur when switching
#              back to primary proxy server; it happens only when the
#              current registration period expires.
#   IVR Access Code <251>
AltGkTimeOut:0

# ------------------------------------------------------------------------
# GkTimeToLive: integer value -- Gatekeeper Time To Live value.
#   IVR Access Code <250>
GkTimeToLive:300

# ------------------------------------------------------------------------
# GateWay: alphanumeric string (31 characters max) -- gateway ip (if
#       gatekeeper is not used for routing call)
#   IVR Access Code <11>
GateWay:0

# ------------------------------------------------------------------------
# GateWay2: IP value -- secondary gateway ip (currently for H.323
#       use only.
#   IVR Access Code <252>
GateWay2:0.0.0.0

# ------------------------------------------------------------------------
# UseLoginID: boolean -- 1 means use Login id specified in LoginId0 and
#       LoginId1 and 0 means not. 
#       * For H323, this field is needed if autm is set to 1
#       * For SIP,  UID0 and UID1 will be used for authentication if this
#         is 0
#
#   IVR Access Code <93>
UseLoginID:0


------> Edit UID0 and UID1 to set usernames known by SER, set PWD0 and PWD1 
too. Each parameter belongs to one phone jack.
# ------------------------------------------------------------------------
# UID0, UID1: alphanumeric string (31 characters max) -- user id for line
#       0 and 1 (max 31 characters or digits)
#   IVR Access Code <3> for UID0
#   IVR Access Code <13> for UID1
#
#
UID0:ata
UID1:0

# ------------------------------------------------------------------------
# PWD0, PWD1: alphanumeric string (31 characters max) -- password for line
#       0 and 1 (max 31 characters or digits)
#   IVR Access Code <4> for PWD0
#   IVR Access Code <14> for PWD1
#
#
PWD0:apfel12
PWD1:0

# ------------------------------------------------------------------------
# LoginId0, LoginId1: alphanumeric string (19 characters max) -- H.323 or 
# SIP Login id for line 0 and 1. For H323, this is needed if AuthMethod
# is set to 1. For SIP, UID0 and UID1 are used for authentication if
# UseLoginID is 0
#   IVR Access Code <46> for LoginId0
#   IVR Access Code <47> for LoginId1
#
#
# Since 2.14, length is extended to 51 characters
LoginID0:0
LoginID1:0

# ------------------------------------------------------------------------
# GkId: alphanumeric string (31 characters max) -- gatekeeper zone id
#       (default is '.').
#   IVR Access Code <91>
GkId:.

# ------------------------------------------------------------------------
# RxCodec: integer value -- receiving audio codec preference
#       possible values are:
#       0 -- g723 (can be selected only if LBRCodec is set to 0)
#       1 -- g711a
#       2 -- g711u
#       3 -- g729a (can be selected only if LBRCodec is set to 3)
#   IVR Access Code <36>
RxCodec:2

# ------------------------------------------------------------------------
# TxCodec: integer value -- transmitting audio codec preference
#       possible values are:
#       0 -- g723 (can be selected only if LBRCodec is set to 0)
#       1 -- g711a
#       2 -- g711u
#       3 -- g729a (can be selected only if LBRCodec is set to 3)
#   IVR Access Code <37>
TxCodec:2

------> If you use local connections only, you may want to set this parameter 
to 0
# ------------------------------------------------------------------------
# LBRCodec: integer value -- Low bit rate codec
#       possible values are:
#       0 -- select one of g723, g711a, or g711u
#       3 -- select one of g729a, g711a, or g711u
#   IVR Access Code <300>
LBRCodec:3

# ------------------------------------------------------------------------
# AudioMode: bitmap value -- Representing Audio operating mode.
# The lower-16 bit for channel 0, and the upper 16-bit for channel 1
#
# bit 0 (mask 0x1): G711SilenceSuppress -- enable g711 silent
#       suppression (1)
# bit 1 (mask 0x2): G711Only -- use g711 only; don't use low-bit-rate
#       codec (0)
# bit 2 (mask 0x4): FaxDetCED -- enable fax CED tone detection (1)
# bit 3 (mask 0x8): FaxDetCNG -- enable fax CNG tone detection (0)
# bit 4-5 (mask 0x30): DtmfMethod --
#       0=always inband (send and receive, don't send SDP info),
#       1=by negotiation (send SDP info, enable rcv, decode others
#         SDP info, send depends on others SDP info), 
#       2=always out-of-band (send SDP info, enable rcv, decode
#         others SDP info, always send) (1)
# bit 6-7 (mask 0xc0): HookflashMethod --
#       0=disable sending hookflash
#       1=by negotiation
#       2=always sending hookflash
#       3=using Q931 to send user keypad input
#         (Dtmf or hookflash) information (0)
#   IVR Access Code <312>
#
#
AudioMode:0x00150015

# ------------------------------------------------------------------------
# NumTxFrames: integer value -- transmit frames per packet.
#       possible values: integer values (please only use the recommended
#       default)
#   IVR Access Code <35>
NumTxFrames:2

# ------------------------------------------------------------------------
# PaidFeatures (CallFeatures): bitmap value -- Subscribe(Enable)/
#   Unsubsribe(Disable) Call Features
# Note:
# - This is a 32-bit value: Lower 16-bit for channel 0, upper 16-bit 
#   for channel 1;
# - CallFeatures and PaidFeatures use the same bit masks. PaidFeatures
#   indicate which service the user has subscribed to and CallFeatures
#   indicate which subsribed feature is (statically) enabled by the
#   the user. Not all subsribed services can be disabled by the
#   user. The valid flags in CallFeatures are CLIP_CLIR, CALL_WAITING,
#   and FAXMODE. A subsribed service enable/disabled by the user can
#   be disabled/enabled dynamically on a per call basis;
#
#    Possible values:
#       bit 0  (mask 0x1):   FORWARD_ALL -- forward unconditional
#       bit 1  (mask 0x2):   FORWARD_BUSY --forward on busy
#       bit 2  (mask 0x4):   FORWARD_NOANS -- forward on no answer
#       bit 3  (mask 0x8):   CLIP_CLIR -- CLIP
#       bit 4  (mask 0x10):  CALL_WAITING  -- call waiting
#       bit 5  (mask 0x20):  3WAY_CALLING -- 3-way calling
#       bit 6  (mask 0x40):  XFER_BLIND -- blind transfer
#       bit 7  (mask 0x80):  XFER_CONSULT -- consult transfer
#       bit 8  (mask 0x100): CALLERID -- caller ID
#       bit 9  (mask 0x200): Call Return
#       bit 10 (mask 0x400): MWI -- message waiting indication
#       bit 15 (mask 0x8000):FAXMODE -- FAX mode
#
#   IVR Access Code <314> for CallFeatures.
#   IVR Access Code <315> for PaidFeatures.
#
#
PaidFeatures:0xffffffff
CallFeatures:0xffffffff

# ------------------------------------------------------------------------
# CallerIdMethod: integer value -- CallerId/DTMFMethod.
#    Possible values are:
# Possible values are:
# bit 0-1 (mask 0x3): method; 0=Bellcore, 1=DTMF, 2=ETSI, 3=FSK (0)
# bit 2 (mask 0x4): method type; 0=type 1, 1=type 2 (0)
# if(method = 0) {
#   bit 3-8 (mask 0x1f8): max no. of digits (12)
#   bit 9-14 (mask 0x7e00): max no. of chars (15)
#   bit 15-20 (mask 0x1f8000): special chars (3)
# }
# else {
#   bit 3-6 (mask 0x78): start digit (12)
#   bit 7-10 (mask 0x780): end digit (14)
#   bit 11 (mask 0x800): polarity reversal (1)
#   bit 12-16 (mask 0x1f000): max no. of digits (15)
# }
#
# USA = 0x19e60
# Sweden = 0x0ff61
# Denmark = 0x0fde1
#
#   IVR Access Code <316>
#
CallerIdMethod:0x00019e60

# ------------------------------------------------------------------------
# CallWaitCallerId: integer value -- Caller Id on CallWaiting.
#    Possible values are:
# bit 0-5 (mask 0x3f): max no of digits (16)
# bit 6-11 (mask 0xfc0): max no of characters (15)
# bit 12-17 (mask 0x3f000): special chars (3)
# bit 18-21 (mask 0x3c0000): ack digit (15)
#   IVR Access Code <317>
#
CallWaitCallerId:0x003c33d0

# ------------------------------------------------------------------------
# Polarity: bitmap value -- control connect and disconnet polarity
#    Possible values are:
#       bit 0 (mask 0x1) -- CALLER_CONNECT_POLARITY, if set,
#         reverse polarity when ATA is the caller and the
#         call is connected.
#       bit 1 (mask 0x2) -- CALLER_DISCONNECT_POLARITY, if set,
#         reverse polarity when ATA is the caller and the
#         call is disconnected.
#       bit 2 (mask 0x4) -- CALLEE_CONNECT_POLARITY, if set,
#         reverse polarity when ATA is the callee and the
#         call is connected.
#       bit 3 (mask 0x8) -- CALLEE_DISCONNECT_POLARITY, if set,
#         reverse polarity when ATA is the callee and the
#         call is disconnected.
#
#   IVR Access Code <304>
#
Polarity: 0

# ------------------------------------------------------------------------
# ConnectMode: bitmap value -- connection mode of the protocol used
#    Possible values are:
#       bit 0 (mask 0x1) -- 0 for slow start and 1 for fast start (h323)
#       bit 1 (mask 0x2) -- 1 use h245 tunneling.
#       bit 3 (mask 0x8) -- 1 means alternate gatekeeper need register.
#       bit 4 (mask 0x10)-- 1 means CallManager environment, 0 otherwise.
#       bit 5 (mask 0x20)-- 1 means no audio cut through before receiving
#                           CONNECT message.
#       bit 6 (mask 0x40)-- 1 means Progress Indicator to be enforced in
#                           IP ringback.
#       bit 12-8 (mask 0x1f00) -- offset to payload 96 (0-23)
#       bit 13 (mask 0x2000) -- 0 use g711ulaw, 1 use g711alaw for 
#                               fax pass through
#       bit 14 (mask 0x4000) -- 0 use fax pass through and 1 use codec 
#                               negotiation in sending fax
#       bit 15 (mask 0x8000) -- 0 means enable/1 means disable detecting 
#                               fax pass through (see Q&A 8)
#       bit 16 (mask 0x10000) -- 1 enables SIP to remove registration
#                                before adding new one
#       bit 17 (mask 0x20000) -- 1 enables SIP call forwarding performed by
#                                ATA
#       bit 18 (mask 0x40000) -- 1 enables SIP call return performed by ATA
#       bit 19 (mask 0x80000) -- 1 enables ATA to send ring back tone to
#                                the caller
#       bit 20 (mask 0x100000) -- 1 enables SIP to specify "action=proxy" in
#                                 REGISTER message
#       bit 21 (mask 0x200000) -- 1 enables SIP to specify "action=redirect"
#                                 in REGISTER message
#       bit 22 (mask 0x400000) -- 1 enables SIP to process "received=" tag in 
#                                 VIA header to extract external IP address 
#                                 used by NAT
#       bit 23 (mask 0x800000) -- 1 allows end-user to specify the default 
call 
#                                 waiting state for every call on a permanent 
#                                 basis
#       bit 24 (mask 0x1000000) -- 1 enable mixing of audio and call waiting 
#                                  tone during a call
#       bit 25-31 -- RESERVED.
#
#       NOTE: Setting both bit 20 & 21 is forbidden; setting both to 0
#             causes SIP not to include "action" parameter in REGISTER
#             message (ie. up to the proxy server to decide what action
#             to take) 
#       
#   IVR Access Code <311>
ConnectMode:0x00060000

# ------------------------------------------------------------------------
# AutMethod: bitmap value -- authentication method.
#    Possible values are:
#       bit 0-1 (mask 0x3) -- 0 for no authentication, 1 for
#                 cisco registration level security (H.235), 2 for cisco 
#                 admission level security.
#       bit 2 (mask 0x4) -- prefix password field when registering.
#   IVR Access Code <92>
AutMethod:0

# ------------------------------------------------------------------------
# TimeZone: integer value -- timezone offset from GMT for time-stamping
#           incoming calls with local time (for caller-id display, etc.).
#   IVR Access Code <302>
#   Possible values are: 0, 1, 2, ..., 24. Local time is generated by
#   the following formula: 
#      Local Time = GMT + TimeZone        , if TimeZone <= 12
#      Local Time = GMT + TimeZone - 25   , if TimeZone > 12
TimeZone:17


------> We used ntp to set the time correctly, enter server ip in NTPIP
# ------------------------------------------------------------------------
# NTPIP: IP value -- ntp ip address (needed if DHCP server does not
#       provide one)
# AltNTPIP: IP value -- alternate ntp ip address (if redundancy is
#       desired).
#   IVR Access Code <141> for NTPIP
#   IVR Access Code <142> for AltNTPIP
NTPIP:10.0.0.20
AltNTPIP:0


------> if no dhcp entere value(s) here too
# ------------------------------------------------------------------------
# DNS1IP, DNS2IP: primary and secondary DNS ip (if DHCP server does not
#       provide one).
#   IVR Access Code <916> for DNS1IP
#   IVR Access Code <917> for DNS2IP
DNS1IP:0.0.0.0
DNS2IP:0.0.0.0

# ------------------------------------------------------------------------
# UDPTOS: bitmap value -- UDP IP TOS (Type of Service) Bits, determines
#       the precedence and delay of UDP IP packet.
#    Possible values are:
#       Only the lower 8 bits should be set.
#   IVR Access Code <255>
UDPTOS:0xA0

# ------------------------------------------------------------------------
# RingOnOffTime: array of shorts integer value (3 shorts) --  control phone
#       ring characteristic.
#    Recommended US Value: 2,4,25
#    Recommended Swedish Value: 1,5,25
RingOnOffTime:2,4,25

# ------------------------------------------------------------------------
# DialTone:
# BusyTone:
# ReorderTone:
# RingBackTone:
# CallWaitTone:
# AlertTone: array of short integers (9 shorts) -- Play back tones.
#   (NOTE: Play back tone can be specified in terms of frequency, the
#   one provided below are precomputed internal value only known
#   to ATA. If frequency entry format is desired, append "Freq" to
#   each tone name: e.g. RingBackToneFreq. Format RingBackToneFreq is
#   ntone,freq[0],freq[1],level[0],level[1],steady,on-time,off-time,
#
#     - ntone (no. of tones): 1 or 2 (integer only) 
#     - freq[0] (Hz): 0.00 to 4000.00
#     - freq[1] (Hz): 0.00 to 4000.00
#     - level[0] (dBm): 10.00 to -60.00
#     - level[1] (dBm): 10.00 to -60.00
#     - steady: 1 (steady tone, next 2 parameters ignored), 
#        or 0 (on/off according to next 2 parameters) (integer only) 
#     - on-time  (ms): 1 to 0x7FFFFFFF (integer only) 
#     - off-time (ms): 1 to 0x7FFFFFFF (integer only) 
#     - total time to play tone (ms): 0 (forever), or 1 to 0x7FFFFFFF
#       (integer only) 
#
#      For example: US Ring-back tone can be specified as
#
#      RingBackToneFreq:2,440.0,480.0,-10.0,-10.0,0,2000,4000,0 
#
#      which is the same as the precomputed ATA internal format:
#
#      RingBackTone:2,30831,30467,1902,1902,0,16000,32000,0
#
# U.S. values are:
#
#DialTone:2,31538,30831,3100,3885,1,0,0,1000
#BusyTone:2,30467,28959,1191,1513,0,4000,4000,0
#ReorderTone:2,30467,28959,1191,1513,0,2000,2000,0
#RingBackTone:2,30831,30467,1943,2111,0,16000,32000,0
#CallWaitTone:1,30831,0,5493,0,0,2400,2400,4800
#AlertTone:1,30467,0,5970,0,0,480,480,1920
#
# Swedish values are:
#
#DialTone:1,30959,0,4253,0,1,0,0,0
#BusyTone:1,30959,0,2392,0,0,2000,2000,0
#ReorderTone:1,30959,0,2392,0,0,2000,6000,0
#RingBackTone:1,30959,0,2392,0,0,8000,40000,0
#CallWaitTone:1,30959,0,2392,0,0,1600,4000,11200
#AlertTone:1,30959,0,2392,0,0,480,480,1920

DialTone:2,31538,30831,3100,3885,1,0,0,1500
BusyTone:2,30467,28959,1191,1513,0,4000,4000,0
ReorderTone:2,30467,28959,1191,1513,0,2000,2000,0
RingBackTone:2,30831,30467,1943,2111,0,16000,32000,0
CallWaitTone:1,30831,0,5493,0,0,2400,2400,4800
AlertTone:1,30467,0,5970,0,0,480,480,1920

# ------------------------------------------------------------------------
# dial plan: alphanumeric string (199 characters max) -- dial plan rules.
#    NOTE: no syntax check is performed by the actual implementation.
#       It is the responsibility of the provisioner to make sure that
#       the dial_plan is syntatically valid.
#
#    dial_plan -- programmable strings of dial plan that allow
#        one to specify:
#            o special rule -- I{timeout} to control default inter-digit
#             timeout - specifying this rule also has the side effect
#             of preventing non-matching dial string from being sent out.
#            o optional send character to use (e.g. '#' or '*')
#            o how many digits before auto send
#            o send after timeout at any specified number of digits
#             (time out can be changed as digits are entered).
#        in the following:
#            o . means match any digits
#            o - means more digits can be entered, this (if needed) must
#                appear at the end of the individual rule
#                (i.e. e.g. 1408t5- is legal, but  1408t5-3... is illegal).
#            o ># means terminating key to send is #, and termination
#                can be applied only after matching hits ># (So >*
#               means terminating char is *, i.e. terminating key
#               must follow >)
#            o rules applied in the order of listed (whichever matched
#               completely first will cause trigger the send).
#            o tn means timeout is n seconds (note: n is 0-9 and
#               a-z -- which ranges 0 to 26).
#            o more than one rules are separated by |.
#            o rn means repeat last pattern n times (note: 1. ># or tn are
#              modifier, they are not pattern; 2. n is 0-9 and a-z --
#              which ranges 0 to 26). Use the repeat modifier to specify
#              more rules in less space.
#
#        You can also use the modifier 'S' to sieze the rule matching
#        (i.e. if a rule matches and the modifier 'S' is seen, all other
#        rules after that matching rule will not be used for matching).
#
#        Examples 1:
#            the set of dial plan rules:
#              ".t7>#......t4-|911|1t7>#..........t1-|0t4>#.t7-"
#             or equivalently
#              ".t7>#r6t4-|911|1t7>#.r9t1-|0t4>#.t7-"
#            consists of the following rules:
#              .t7>#......t2- -- at least one digit need to be
#                    entered, after that, time out is 7 seconds
#                    before send, and terminating char # can also
#                    be applied after the first digit is entered,
#                    and after 7 digits are entered, time out
#                    change to 2 seconds. * means further digits
#                    can be entered as long as not terminated by
#                    timeout or #.
#              911 -- send out immediately
#              1t7>#..........t1- -- at least one digit need to be
#                    entered, after that, time out is 7 seconds
#                    before send, and terminating char # can also
#                    be applied after the first digit is entered,
#                    and after 10 digits are entered, time out
#                    change to 1 second. * means further digits can be
#                    entered as long as not terminated by timeout
#                    or #.
#              0t4>#.t7- -- after entering 0, if no other digit is
#                    entered, it will timeout and send in 4 seconds,
#                    otherwise, time out change to 7 seconds after
#                    another key is entered. again # is terminating
#                    digit.
#       Examples 2:
#           the set of dial plan rules:
#               "911|1>#.r9t3.t5-|0t411t9-"
#           if 911 entered, it will be sent out immediately.
#           if 14088713344 is entred, after 3 seconds, it will
#           be sent out but if another digit is entered (say
#           140887133445, the timeout chaned to 5 seconds).
#           if 0 is entered, after 4 seconds, it will be send out.
#           if 011 is entered, the time out changed to 9 seconds.
#
#       New 'H' rule to support hot/warm line since v2.14:
#           Hdnnnn
#       where d is a delay in seconds parameter 0-9,a-z (for 0 to 35 seconds
#       delay), and nnnn is the variable length phone number to call when
#       no digits are entered for d seconds after offhook
#       Example 1: H05551212 (off hook and call 5551212 immediately)
#       Example 2: H5923123456 (off hookd, if digits entered for 5
#          seconds, call 923123456)
#
#       New 'P' rule to support dial prefix since v2.14:
#           Ptnnnn
#       where t is a single leading trigger digit if occurs as the FIRST
#       entered digit when making a new call will trigger the prepending
#       of a variable length  prefix (as specified in "nnnn") in the dial
#       string. 't' can take one of the following values:
#
#         0-9,
#         *,
#         #,
#         'n'
#         (= any of 1-9),
#         'N' (any of 'n' and 0),
#         'a' (any of 'n',* and #),
#          or 'A' (any of 'a' and 0);
#
#       Example: Pn12345, will prepend 12345 to the dial string when the
#       first entered digit is any of 1-9.
#
#       Note: the trigger digit is not removed from the dial string
#
DialPlan:*St4-|#St4-|911|1>#t8.r9t2-|0>#t811.rat4-|^1t4>#.-

# ------------------------------------------------------------------------
# IPDialPlan: integer value -- allow for detection of ip like destination
#       address in dial plan.
#    Possible values:
#       1 -- if two '.' is seen, then assume ip being possibly entered.
#       2 -- if three '.' is seen, then assume ip being possibly entered.
#       all other values are currently undefined.
#   IVR Access Code <310>
IPDialPlan: 1

# ------------------------------------------------------------------------
# CallCmd: alphanumeric strings (248 characters max) -- table that
#       control call commands like turning on and off caller id, etc.
#
#  US Cmd Table
#CallCmd:Af;AH;BS;NA;CS;NA;Df;EB;Ff;EP;Kf;EFh;HQ;Jf;AFh;HQ;I*67;gA*82;fA#90v#;OI;H#72v#;bA#74v#;cA#75v#;dA#73;eA*67;gA*82;fA*70;iA*69;DA*99;xA;Uh;GQ;
#  Sweden Cmd Table
#CallCmd:BS;NA;CS;NA;Df;EB;Ff0;ARf1;HPf2;EPf3;AP;Kf1;HFf2;EFf3;AFf4;HQ;Jf1;HFf2;EFf3;AFf4;HQ;Af4;HQ;I*31#;gA#31#;gA*90*v#;OI;H*21*v#;bA*61*v#;dA*67*v#;cA#21#;eA#61#;eA#67#;eA*31#;gA#31#;gA*43#;hA#43#;iA*69#;DA*99#;xA;Uh;GQ;
CallCmd:Af;AH;BS;NA;CS;NA;Df;EB;Ff;EP;Kf;EFh;HQ;Jf;AFh;HQ;I*67;gA*82;fA#90v#;OI;H#72v#;bA#74v#;cA#75v#;dA#73;eA*67;gA*82;fA*70;iA*69;DA*99;xA;Uh;GQ;


--------> important SIP parameters follow
# ========================= SIP Parameters ===============================
# ------------------------------------------------------------------------
# UseSIP: boolean value -- use SIP mode (default H.323)
#   IVR Access Code <38>
UseSIP:1

-------> for nat traversal: set natip to external gateway ip, set media port 
to something and set SIPPort to something noone else needs on the external 
gateway. Then forward SIPPort and MediaPort (next four ports too!) to your 
ata.
# ------------------------------------------------------------------------
# NATIP: IP value -- WAN address of the attached router/NAT; currently 
#                    only used to support SIP behind a NAT
#   IVR Access Code <200>
#NATIP:62.220.13.73

# ------------------------------------------------------------------------
# MediaPort: integer value -- base port to receive RTP media; currently 
#                             only used to support SIP behind a NAT
#   IVR Access Code <202>
MediaPort:16384

# ------------------------------------------------------------------------
# SIPPort:
# SIPRegInterval:
# SIPRegOn:
# MAXRedirect: integer value -- SIP specific parameters
#       parameters.
#   IVR Access Code <201> for SIPPort - Port to listen for incoming SIP
#       requests
#   IVR Access Code <203> for SIPRegInterval - seconds between reg
#       renewal
#   IVR Access Code <204> for SIPRegOn - enable sip registration
#   IVR Access Code <205> for MaxRedirect - max num of time to try
#       redirection
SIPPort:5061
SIPRegOn:1
SIPRegInterval:120
MaxRedirect:5

# ------------------------------------------------------------------------
# SipOutBoundProxy -- SIP Proxy Server for all outbound SIP requests
#   Web-Tag: OutBoundProxy
#   IVR Access Code <206> 
#   Format: Null-terminated alpha-numeric string with up to 31 characters.
#           It can be an IP address with or without a port parameter such
#           as 123.123.110.45, 123.123.110.45.5060, or 123.123.110.45:5061,  
#           or URL such as sip.cisco.com, sip.komodo.cisco.com:5061. For
#           IP address, a '.' or ':' can be used to delimit a port parameter.
#           For URL, a ':' must be used to indicate a port
#           If URL is given, up to 2 IP addresses (A records) can be resolved
#           via DNS. If a 2nd IP addr is available, it is used as a backup
#           outbound proxy. In the case, the AltGkTimeout parameter also
#           determines the expiration time of the backup outbound proxy
SipOutBoundProxy:sipserver.yourdomain.com:5060

-------> you dont need that if you use nat like explained above
# ------------------------------------------------------------------------
# NatServer -- FQDN and port of a server to send dummy single byte UDP pkt
#              to to maintain a NAT translation in a session; max totol
#              length is 47 characters
#   IVR Access Code <207> 
# NatTimer -- bit0-11 = Time interval in seconds between sending the dummy 
#            UDP packets to NatServer
#             bit 12-31 = Reserved; should be set to 0
#   IVR Access Code <208> 
NatServer:0
NatTimer:0


-------> If you want logging, set this. It's enough to run a netcat listening 
on that machine/port, no need for the dos tool.
# ------------------------------------------------------------------------
# NPrintf: extended IP value -- diagnostic use, debug output print server
#       IP address and port.
#       You need a program called "prserv" running on port number say
#       9001 on a machine (say 192.168.2.170). Then setting this parameter
#       to 192.168.2.170.9001 will cause ATA to output debug trace
#       to that server. Prserv is available from CCO.
#   IVR Access Code <81>
#NPrintf:10.0.0.20.9001

# ------------------------------------------------------------------------
# TraceFlags: bitmap value -- diagnostic use, turn on specific trace
#       features.
#   Bit 0-1: SIP debug level: 0=no debug msgs, 1=all sip msg, 2,3=reserved
#   IVR Access Code <313>
TraceFlags:0x00000001

# ------------------------------------------------------------------------
# EchoIP: extended IP -- diagnostic use, echo loopback test server. This
#       server is a echo loop back UDP server running at port number 5665.
#       Via IVR, when the user enter IVR code "test9", the user can
#       listen to an echo loop back spoken to the handset.
#   IVR Access Code <904>
EchoIP:192.168.2.9

# ------------------------------------------------------------------------
# SigTimer: 32-bit bit fields which contain timeout values to start/stop 
#           the following signalling events:
#
#  CWT PERIOD (Bits 0-7) : 
#    Period between each burst of call-waiting tone
#    Range = 0 to 255 in 0.1 sec; 0 => default 100 (or 10 sec)
#    Default: 100 (0x64 = 10 sec)
#
#  REORDER DELAY (bits 8-13):
#    Delay in playing reorder (fast busy) tone after far end hangs up
#    Range = 0 to 62 in sec, 63 = never play reorder 
#    Default: 5 (sec)
#
#  RING TIMEOUT (bits 14-19):
#    Timeout in ringing the phone after which ATA rejects the incoming call
#    Range = 0 to 63 in 10 sec, 0=never times out
#    Default: 6 (60 sec)
#
#  NOANS TIMEOUT (bits 20-25)
#    Time to declare no answer and initiate call forwarding on no answer 
#    (used in SIP only at the moment)
#    Range = 0 to 63 in sec
#    Default: 20 (0x14 = 20 sec)
#   
#  MINIMUM FLASH-HOOK TIME (bits 26-27)
#    Minimum on-hook time required for flash-hook event
#      Range: 0 to 3
#    Default: 0  (60 ms)
#
#         0 =  60 ms     2 = 200 ms
#         1 = 100 ms     3 = 300 ms
#
#  MAXIMUM FLASH-HOOK TIME (bits 28-31)
#    Maximum on-hook time allowed for flash-hook event
#      Range: 0 to 15
#    Default: 0  (1000 ms)
#
#         0 = 1000 ms    8 =  800 ms
#         1 = 100 ms     9 =  900 ms
#         2 = 200 ms    10 = 1000 ms
#         3 = 300 ms    11 = 1100 ms
#         4 = 400 ms    12 = 1200 ms
#         5 = 500 ms    13 = 1300 ms
#         6 = 600 ms    14 = 1400 ms
#         7 = 700 ms    15 = 1500 ms
#
#  IVR Access Code <318>
SigTimer:0x01418564

# ------------------------------------------------------------------------
# OpFlags: bitmap value -- turn on/off various operational features.
#   Bit 0 (mask 0x1): if set to 1, always use the internally generated
#                     TFTP config file name.
#   Bit 1 (mask 0x2): if set to 1, do not perform static network router
#                     probing at cold start.
#   Bit 3 (mask 0x8): if set to 1, do not ask for DHCP option 150 in
#                     DHCP discovery message (some DHCP server will not
#                     response if option 150 is requested).
#   Bit 4 (mask 0x10): if set to 1, assume operating under VLAN (the VLAN
#                     id is specified in VLANSetting, see VLANSetting
#                     parameter).
#   Bit 5 (mask 0x20): if set to 1, do not use VLAN IP encapsulation, i.e.
#                     force turning off VLAN IP encapsulation.
#   Bit 6 (mask 0x40): if set to 1, do not perform CDP discovery.
#   Bit 7 (mask 0x80): if set to 1, do not allow web configuration.
#                       (added in version 2.14 020514 patch)
#   Bit 8 (mask 0x100): if set to 1, do not allow http://ip/refresh.
#                       (added in version 2.15)
#   Bit 9 (mask 0x200): if set to 1, do not allow http://ip/reset.
#                       (added in version 2.15)
#
#   IVR Access Code <323>
OpFlags:0x2

# ------------------------------------------------------------------------
# VLANSetting: bitmap value -- for firmware version 2.15 and 2.14ms, and 
above.
#               The value specify various VLAN Setting:
#   Bit 2-0 (mask 0x7): specify 802.1Q priority for Signalling IP packets.
#   Bit 5-3 (mask 0x38): specify 802.1Q priority for Audio Voice IP packets.
#   Bit 17-6 (mask 0x3ffc0): reserved.
#   Bit 29-18 (mask 0x3ffc0000): user specified 802.1Q VLAN id.
#   Bit 31-30 (mask 0xc0000000): reserved.
#   IVR Access Code <324>
VLANSetting:0x0000002b

# ------------------------------------------------------------------------
# FeatureTimer: bitmap value -- This parameter provides configurable 
#               timing values for certain features.
#
#   Bits    Description
# -------   --------------------------------------------------------------  
#  0 - 3    Maximum time to spend redialing if line is busy
#
#             Range: 0 - 15
#            Factor: 5 minutes increment
#            Values: 0 - 75 minutes
#           Default: 0  (= 30 minutes)
#
#  4 - 7    Retry interval if line is busy
#
#             Range: 0 - 15
#            Factor: 15 seconds increment
#            Values: 0 - 225 seconds
#           Default: 0  (= 15 seconds)
#
#  8 - 12   On-hook delay before a call is disconnected
#           
#             Range: 0 - 31
#            Factor: 5 seconds increment  
#            Values: 0 - 155 seconds   
#           Default: 0  (no delay)
#
#  IVR Access Code <317>
#
FeatureTimer:0x00000000
------> end of config file

If you experience problems, try to sniff the packets passing your network with 
ngrep or ethereal. If everything's right, dialing number 12345678 will result 
in a sip request to 12345678 at sipserver.yourdomain.com.

Hope this helps,

Uli.



On Monday 14 July 2003 17:11, Andy Blen wrote:
> Hallo,
>
> Kannst Du dem Herrn behilflich sein -- Du kennst Dich bischen mit ATA aus.
>
> Vetraunsvoll Deine Andy
>
> >X-From_: jgcastan at tutopia.com  Mon Jul 14 17:01:49 2003
> >X-Original-To: abl at fox.iptel.org
> >Delivered-To: abl at fox.iptel.org
> >Date: Mon, 14 Jul 2003 10:03:47 -0500
>
> From: "Juan G. Castañeda" <jgcastan at tutopia.com>
>
> >User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2)
> > Gecko/20030208 Netscape/7.02 X-Accept-Language: en-us, en
> >To: Andy Blen <andy.blen at iptel.org>
> >Subject: Re: Hardphone
> >X-Spam-Status: No, hits=1.7 required=5.0
> >        tests=EMAIL_ATTRIBUTION,HTML_80_90,HTML_COMMENT_SAVED_URL,
> >              HTML_MESSAGE,NORMAL_HTTP_TO_IP,REFERENCES,
> >              USER_AGENT_MOZILLA_UA,X_ACCEPT_LANG
> >        version=2.55
> >X-Spam-Level: *
> >X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)
> >
> >
> >
> >Dear Andy:
> >
> >I visited the webpages you mentioned in your email, but I am not a
> > computer savvy person. Could you please plug in the paramaters needed in
> > the ATA configuration file I am attaching to make the ATA work with your
> > SIP server. I will be very thankful for your helpful  assistance.
> >
> >Thanks,
> >
> >Juan G. Castañeda
> >
> >Andy Blen wrote:
> >>see our faq
> >> <http://www.iptel.org/phpBB/viewforum.php?forum=1&28>http://www.iptel.or
> >>g/phpBB/viewforum.php?forum=1&28
> >>
> >>At 11:57 PM 7/12/2003, Juan G. Castañeda wrote:
> >>>Sirs:
> >>>
> >>>How can dial through a hardphone? In few words how should I configure an
> >>> ATA 186 to be used with your SIP server to dial a callee?
> >>>
> >>>Thanks
> >>>
> >>>Juan G. Castañeda
> >>
> >>--
> >>Andy Blen
> >>iptel.org Services
> >
> >xmlns:o="urn:schemas-microsoft-com:office:office"
> > xmlns:w="urn:schemas-microsoft-com:office:word"
> > xmlns="http://www.w3.org/TR/REC-html40">
> >
> >
> >Cisco ATA 186 Configuration
> >
> >
> >
> >UIPassword:
> >
> >ToConfig:
> >
> >UseTftp:
> >
> >TftpURL:
> >
> >CfgInterval:
> >
> >EncryptKey:
> >
> >Dhcp:
> >
> >StaticIP:
> >
> >StaticRoute:
> >
> >StaticNetMask:
> >
> >UID0:
> >
> >PWD0:
> >
> >UID1:
> >
> >PWD1:
> >
> >GkOrProxy:
> >
> >Gateway:
> >
> >GateWay2:
> >
> >UseLoginID:
> >
> >LoginID0:
> >
> >LoginID1:
> >
> >AltGk:
> >
> >AltGkTimeOut:
> >
> >GkTimeToLive:
> >
> >GkId:
> >
> >UseSIP:
> >
> >SIPRegInterval:
> >
> >MaxRedirect:
> >
> >SIPRegOn:
> >
> >NATIP:
> >
> >SIPPort:
> >
> >MediaPort:
> >
> >OutBoundProxy:
> >
> >NatServer:
> >
> >NatTimer:
> >
> >LBRCodec:
> >
> >AudioMode:
> >
> >RxCodec:
> >
> >TxCodec:
> >
> >NumTxFrames:
> >
> >CallFeatures:
> >
> >PaidFeatures:
> >
> >CallerIdMethod:
> >
> >FeatureTimer:
> >
> >Polarity:
> >
> >ConnectMode:
> >
> >AutMethod:
> >
> >TimeZone:
> >
> >NTPIP:
> >
> >AltNTPIP:
> >
> >DNS1IP:
> >
> >DNS2IP:
> >
> >TOS:
> >
> >SigTimer:
> >
> >OpFlags:
> >
> >VLANSetting:
> >
> >NPrintf:
> >
> >TraceFlags:
> >
> >RingOnOffTime:
> >
> >IPDialPlan:
> >
> >DialPlan:
> >
> >DialTone:
> >
> >BusyTone:
> >
> >ReorderTone:
> >
> >RingBackTone:
> >
> >CallWaitTone:
> >
> >AlertTone:
> >
> >CallCmd:
> >
> >
> >
> >
> >
> >
> >ata0006d7a57655
> >Version: v2.16 ata18x (Build 030401a)
> >DHCP Assigned: IP[192.168.0.2] Subnet[255.255.255.0] Route[192.168.0.1]
> >MAC: 0.6.215.165.118.85
>
> --
> Andy Blen
> iptel.org Services



More information about the sr-users mailing list