EDITING / CONFIGURING app_rpt FILES and OPTIONS

Next step,  if you started from the beginning of our quickie install example,  is to edit and configure the system files. If you want to start from the beginning CLICK HERE

A quick word once again, we are not exploring all the options you may have with this. We are assuming you care not about reading up on this stuff before you make a move. This data only pertains to ACID install.

Some rules here are that any part of a line in a .conf file that starts with ; (semicolon) is ignored and. can appear anywhere on a line but the system ignores anything after it. Lines can be very long so don’t be confused if they wordwrap to the next line.

All .conf files are located in /etc/asterisk

You can edit these .conf files locally using the “NANO” editor (included in install).

We will start with extensions.conf

cd  /etc/asterisk

nano extentions.conf

 

 In order to get our two apps 3CX and iaxRPT working, you need to make some entries but with your node number(s) and passwords not mine. Do not copy paste text from this text, it is formatted differently and may bugger up your file. …Just a updated note… 3cx is no longer available for pc/mac under asterisk. The company went proprietary. I suggest LINPHONE in it’s place.

[general]

static=yes       ; These two lines prevent the command-line interface
writeprotect=yes ; from overwriting the config file. Leave them here.

[globals]
HOMENPA=330     ; your home telephone area code

[default]
exten => i,1,Hangup

; After the above in the file enter this for iaxRPT

[radio-gui]
exten => 29283,1,rpt(29283|X)

; then Add the next for phone control (3cx or other softphone).

[radio-control]
exten => 29283,1,Answer
exten => 29283,n,Wait(2)
exten => 29283,n,Playback(rpt/node)
exten => 29283,n,Playback(digits/2)   ;say node digits one at a time
exten => 29283,n,Playback(digits/9)
exten => 29283,n,Playback(digits/2)
exten => 29283,n,Playback(digits/8)
exten => 29283,n,Playback(digits/3)
exten => 29283,n,Rpt,29283|P   ; make connection – the P is for phone control mode

OR *Note:  you can do the same thing with the following-

exten => 29283,1,Answer
exten => 29283,n,Wait(2)
exten => 29283,n,Playback(rpt/node)
exten => 29283,n,SayAlfa(29283)   ;says digits one at a time(plays letters & numbers)
exten => 29283,n,Rpt,29283|P   ; make connection – the P is for phone control mode

 ; save your file/exit

using nano… <ctrl> + O = write file      then <ctrl> + X = exit

But for future reference, Other options for the control mode for the extension control.
Note the preceding character is a “pipe” – “|” it’s NOT a lower case L or Upper case  I and is used in programming languages as a inline command separator. Look above the backslash on most keyboards.

D = Dumb exten
P= Phone exten
S = Simple exten
Pv = Phone VOX exten
X = Disable security checks

Next Lets edit iax.conf  next

nano iax.conf

; after these lines

[general]
bindport=4569
bindaddr=0.0.0.0
disallow=all
allow=gsm
allow=g726aal2
allow=ulaw
jitterbuffer=yes
forcejitterbuffer=yes
dropcount=2
maxjitterbuffer=4000
maxjitterinterps=10
resyncthreshold=1000
maxexcessbuffer=80
minexcessbuffer=10
jittershrinkrate=1
tos=0x1E
autokill=yes
delayreject=yes
;iaxthreadcount=30
;iaxmaxthreadcount=150

register=29283:123456@register.allstarlink.org

; insert this for iaxRPT:

[gui]
type=user
context=radio-gui
username=gui
auth=md5
secret=mypassword   ; your password
host=dynamic
disallow=all
allow=gsm
notransfer=yes

; save your file /exit

;Now edit sip.conf for our 3cx /  softphone

; insert this to the bottom of the file and use your own pass/extension/cid

[6010]                  ;  my 3cx on  iPad extension
deny=0.0.0.0/0.0.0.0
username=6010
secret=yourpasswd
dtmfmode=rfc2833
canreinvite=no
context=radio-control
host=dynamic                     ; unless you set it to a static ip it is dynamic / dhcp
trustrpid=yes
sendrpid=no
type=friend
nat=no
port=5060
qualify=yes
qualifyfreq=60
transport=udp
encryption=no
callgroup=
pickupgroup=
dial=SIP/6010
mailbox=6010@device
permit=0.0.0.0/0.0.0.0
callerid=iPad <6010>    ; pick your own cid name

; save file /exit

 

;Make sure you have saved your work and entered the correct setup for your iaxRPT and 3CX/softphone and reboot your system (type “reboot”  on radio pbx command hash#)

 

;Next we will edit rpt.conf and explain the many options but not all of them. Posted here as a examples, see comments to see what the functions do. if your first node is a remote base then see next example.

;It helps to keep your command numbers (as you might enter them on the keypad) in order in function layout so you don’t half-dup a number that will execute before another. EX: *89 and *891. The *891 may never execute. This is most important on phone control mode – doing this could lock you out of a command. Use *890 / *891 so all *89x commands are made into 3 digits and would solve this.

;The default settings you downloaded from your allstarlink should be enough for a initial test but you will want to add  this line to rpt conf that is helpful in testing.

[Funtions-node#]

90=cop,1     ;warm boot – put in function stanza to restart asterisk  by phone/radio by typing *90

; the format is (your assigned command)=(static internal system command)

; a leading star is assumed

Set up the 3CX software : Use data from your IP and your assigned extension number.

; from3CX/softphone… dial your node number ex 29283, then try commands.

; Test your set-up so far / otherwise here is a example rpt.conf:

[29283]            ; assigned node number my 220 repeater

rxchannel = SimpleUSB/usb        ; Rx audio/signalling channel
;rxchannel=Radio/usb29283           ; cm108 usb sound

; txchannel=Radio/usb29283           ;use only if tx is different usb than rx.
duplex=2   ; 1=half duplex

erxgain=2                      ; Echolink receive gain adjustment
etxgain=2                      ; Echolink transmit gain adjustment
; Note: Gain is in db-volts (20logVI/VO)
iobase = 0x378           ; parallel port address if used

; controlstates=controlstates    ; system control state list
scheduler=schedule29283    ;this node has a specific sched of its own
morse=morse-all          ; i use a common morse for all nodes on my system
macro=macro29283    ;this node has its own macro list
functions=functions-all       ; i use a common function command list for all my nodes
phone_functions=functions-all    ; part of the common command list above
link_functions=functions-all   ; part of the common command list above
telemetry=telemetry
wait_times=wait-times

context=radio
callerid = “Repeater” <0000029283>
idrecording = |iKB8JNM-R
accountcode=RADIO
; archivedir= /etc/asterisk/activitylog/    ; use this only if you need it as it will slow your system a bit if doing so on multiple nodes and/or have high load scripts running from crontab. enable at least once to see how it works.

hangtime=3500
althangtime=100
totime=170000
idtime=540000
politeid=3000
parrotmode=0   ; 0=off 1= By Cop Command and 2=Full time parrot simplex/rpt rpt

idtalkover=|iKB8JNM-R
unlinkedct=ct2
remotect=ct3
linkunkeyct=ct8
;nolocallinkct=0
;eannmode=1
;connpgm=yourconnectprogram
;discpgm=yourdisconnectprogram
;lnkactenable=0
;lnkacttime=1800
;lnkactmacro=*52
;lnkacttimerwarn=30seconds
;remote_inact_timeout=1800
;remote_timeout=3600
nounkeyct=0
;holdofftelem=0
beaconing=0

; *** Status Reporting *** For ACID ***
statpost_program=/usr/bin/wget,-q,–timeout=15,–tries=1,–output-document=/dev/null
statpost_url=http://stats.allstarlink.org/uhandler.php ; Status updates

[schedule29283]
;macro# to run then  m h dom mon dow – ala cron, star is “any” wildcard

; our example here will call macro 1 below to play time on the hour
1=00 * * * *   ;run macro 1 on the hour

[macro29283]
;Macro number = command string (ea command separated by space) -end with HASH
1=*81#    ; play time – (this time command output is a built in string and can’t be changed)

[functions-all]

0=autopatchdn    ; Autopatch down
1=ilink,1         ; Disconnect Link xxx
2=ilink,2         ; Con Link xxx RX-Only (mon)
3=ilink,3         ; Con Link xxx TX
4=ilink,4         ; Enter Command Mode on XXX
5=macro           ; Run a macro ##

6=autopatchup,noct=1,farenddisconnect=1,dialtime=20000     ; Autopatch up

70=ilink,5        ; Link Status (long)
71=ilink,6        ; Disconnect All Links
72=ilink,7
73=ilink,15       ; Full Sys Status (all nodes)
74=ilink,16       ; Reconnect Links (that were disconnected by command)
75=ilink,8

80=status,1       ; Force id global
81=status,2       ; Time
82=status,3       ; Give Software ver Global
88=cop,32         ; DTMF Pad test – end test string with a “#”

8900=cop,24   ; cancel localplay stream & telemetry

8901=localplay,/var/lib/asterisk/sounds/wx/wxfc    ;my custom wx script player example

8902=localplay,/var/lib/asterisk/sounds/wx/wxalert    ;my custom wx alert script player example

90=cop,1          ;warm boot
91=cop,2           ; System enable – you should not comment these out in a live system
92=cop,3        ; System disable

99=cop,6          ; Remote sip/telephone PTT key command  (# to unkey)

910=cop,4        ; Test tone on/off
912=cop,5        ; Dump system variables on console (debug use only)
914=cop,7        ; Time out timer enable
915=cop,8        ; Time out timer disable
916=cop,9        ; Autopatch enable
917=cop,10        ; Autopatch disable
918=cop,11        ; User linking functions enable
919=cop,12          ; User linking functions disable
920=cop,13        ; Query system control state
921=cop,14        ; Set systemc control state
922=cop,15        ; Scheduler enable
923=cop,16        ; Scheduler disable
924=cop,17        ; User functions enable (time, id, etc)
925=cop,18        ; User functions disable
926=cop,19        ; Select alternate hang time (althangtime)
927=cop,20        ; Select standard hangtime (hangtime)

998=cop,61,pp8=1    ;switch parallel port pin 8 on
999=cop,61,pp8=0   ;same as above but turn off (set ioport=hex val to work)

[telemetry]
ct1=|t(350,0,100,2048)(500,0,100,2048)(660,0,100,2048)
ct2=|t(660,880,150,2048)
ct3=|t(440,0,150,4096)
ct4=|t(550,0,150,2048)
ct5=|t(660,0,150,2048)
ct6=|t(880,0,150,2048)
ct7=|t(660,440,150,2048)
ct8=|t(700,1100,150,2048)
remotetx=|t(1633,0,50,3000)(0,0,80,0)(1209,0,50,3000);
remotemon=|t(1209,0,50,2048)
cmdmode=|t(900,903,200,2048)
functcomplete=|t(1000,0,100,2048)(0,0,100,0)(1000,0,100,2048)
patchup=rpt/callproceeding
patchdown=rpt/callterminated

; This section allows wait times for telemetry events to be adjusted
; A section for wait times can be defined for every repeater

[wait-times]
telemwait=3000
idwait=500
unkeywait=600
calltermwait=2000

; Morse code parameters.
[morse-all]
speed=18
frequency=700
amplitude=4096
idfrequency=800
idamplitude=1024

;[controlstates]
;;
;; controlstates allow several control operator functions to be grouped together so that one command may be used
;; to select one of 10 groups of control operator functions.
;;
;; These are the valid control operator function pairs
;;
;; rptena,rptdis         –       Repeater Enable/Disable
;; lnkena,lnkdis         –       Linking functions Enable/Disable
;; apena,apdis           –       Autopatch functions Enable/Disable
;; totena,totdis         –       Timeout timer Enable/Disable
;; skena,skdis           –       Scheduler Enable/Disable
;; ufena,ufdis         –     User functions enable/disable
;; atena,atdis         –     Alternate hang time enable/disable
;;
;; up to 10 control state combinations can be defined
;;
;; Upon startup, state 0 will be loaded.
;; If no control states are defined, all control states will default to being enabled.
;;
;;
;0 = rptena,lnkena,totena,apena
;1 = rptena,lnkena,totdis,apdis
;2 = rptena,lnkdis,totena,apdis

; This is where you define your nodes which can be connected to.
[nodes]
; Note, if you are using automatic update for allstar link nodes,
; no allstar link nodes should be defined here. Only place a definition
; for your local nodes, and private (off of allstar link) nodes here.

29283 = radio@127.0.0.1/29283,NONE  ; this node connected to this computer

#includeifexists custom/rpt.conf          ;if the rpt.conf file exists in the child directory (custom), load it also.

 ********************************

At this point you should have a working node “Without Radios” !

Want to test it out and learn a few commands… NEXT

http://themidnightengineer.com/app_rpt-testing-link-commands/

Want to look at more info…

Select from the menu above -Amateur Radio/app_rpt/

 

THIS PAGE MAY NEED REVISED !

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>