iaxRpt disconnects after 45 seconds

Hi Guys.
Help please.
Why would iaxRpt disconnect after 45 seconds?

dudstar is the same, as is mobile phone versions of both.
I can connect and control (connect to nodes, TX, RX and disconnect)
But after 45 second astrisk -rvvv shows.

[Jan 10 14:26:30] ERROR[360]: app_rpt.c:18666 rpt: No link messages from [2E0LXY] in 46 seconds – One way audio??? Forcing reconnect
– Hungup ‘IAX2/myphone-iaxrpt-1205’
– Hungup ‘DAHDI/pseudo-1834626259’

I’ve set “Is node a remote base station?” on the Allstarlink page to NO, as that was suggested in past.

Many thanks

Daren 2E0LXY

Can you show the full stanza for your iaxrpt connection in iax.conf (mask password)

; WARNING - THIS FILE WAS AUTOMATICALLY CONFIGURED FROM A
; TEMPLATE FILE IN /usr/local/etc/asterisk_tpl BY THE
; NODE-CONFIG.SH SCRIPT.
;
; EACH TIME THIS SCRIPT IS RUN, THIS FILE WILL BE OVERWRITTEN.
; IF YOU CHANGE ANYTHING IN THIS FILE AND RUN THE NODE-CONFIG.SH
; SCRIPT, IT WILL BE LOST.
;
; IF YOU INTEND TO USE THE NODE-CONFIG.SH SCRIPT, THEN YOU SHOULD
; MAKE MODIFICATIONS TO THE ACTUAL TEMPLATE FILES LOCATED IN
; /usr/local/etc/asterisk_tpl directory.
;
; Inter-Asterisk eXchange driver definition
;
; For manual configuration edit the registration lines
; below and also passwords for various connections.

; Updated 1/2019 to include additional features
; Before attempting to add features ensure they
; are not already installed

; THIS IS AN IMPORTANT FILE! EDIT CAREFULLY!
; MAKE A BACKUP BEFORE EDITING

[general]
bindport=4569
bindaddr=0.0.0.0
disallow=all
allow=g726aal2
allow=ilbc
allow=ulaw
allow=gsm
; Hamvoip additional codecs - uncomment as needed
;allow=g729
;allow=adpcm
;allow=g722
;allow=codec2
;
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

; Uncomment one or both of the following lines and add
; your node number in place of xxxxx
; and your node password in place of yyyyyy

; Include hamvoip registration
#includeifexists iax-hamvoip.conf

register => 53047:mypassword@register.allstarlink.org
;register => 53047:yyyyyy@register.allstarlink.org

[radio-proxy]
type=user
;deny=0.0.0.0/0.0.0.0
;permit=0.0.0.0/255.255.255.255
context=radio-secure-proxy
disallow=all
allow=g726aal2
allow=ilbc
allow=ulaw
allow=gsm
; Hamvoip additional codecs - uncomment as needed
;allow=g729
;allow=adpcm
;allow=g722
;allow=codec2
;transfer=no

[radio-proxy-out]
type=peer
host=
; add your node number as username
username=53047
; add your node password as secret
secret=mypassword
auth=md5
disallow=all
allow=g726aal2
allow=ilbc
allow=ulaw
allow=gsm
; Hamvoip additional codecs
;allow=g729
;allow=adpcm
;allow=g722
;allow=codec2
;transfer=no

; IAXRPT Example - THis stanza is used for Windows IAXRPT

[iaxrpt]
user=iaxrpt
type=user
context=radio-iaxrpt
auth=md5
; add a password of your selection for secret
secret=mypassword
host=dynamic
disallow=all
allow=ulaw
allow=gsm
transfer=no

; Example for Android/Iphone Zoiper/IAXRPT phone connections
; Commented lines below must be configured to your settings
; See the iax-rpt or zioper howto at hamvoip.org

[myphone-iaxrpt] ; The stanza is the Username from the phone app
type=friend
context=phone-iaxrpt
host=dynamic
auth=md5
secret=mypassword
disallow=all
allow=ulaw
transfer=no
calltokenoptional=0.0.0.0/0.0.0.0
requirecalltoken=no

; [pbx]
;type=friend
;username=pbx
;host=192.168.0.2
;;auth=md5
;secret=wa3dsp23
;context=default

; Incoming radios needed connections

[radio]
type=user
disallow=all
allow=g726aal2
allow=ilbc
allow=ulaw
allow=gsm
; Hamvoip additional codecs - uncomment as needed
;allow=g729
;allow=adpcm
;allow=g722
;allow=codec2
;
codecpriority=host
;
; To use the ban/allow (blacklist/whitelist) feature
; comment with a ‘;’ the context = radio-secure line and
; remove the ‘;’ from either the context = whitelist or
; context = blacklist line. ONLY ONE of the three lines
; can be active (uncommented).
;
; The best way to allow or ban nodes from the database is to
; use the Supermon application or the node-ban-allow.sh script.

context = radio-secure
;context = whitelist
;context = blacklist
;
transfer=no

; Incoming phone connections to app_rpt

;[radio-control]
;type=user
;secret=nunya
;disallow=all
;allow=gsm
;allow=ilbc
;allow=ulaw
;allow=gsm
; Hamvoip additional codecs - uncomment as needed
;allow=g729
;allow=adpcm
;allow=g722
;allow=codec2
;
;codecpriority=host
;context=radio-control
;transfer=no

; For Allstar Phone access
[allstar-sys]
type=user
context=allstar-sys
auth=rsa
inkeys=allstar
disallow=all
allow=ulaw

; For Allstar web page access
[allstar-public]
type=user
context=allstar-public
auth=md5
secret=allstar
disallow=all
allow=ulaw
allow=gsm

; Setup for outgoing calls

;[yourprovider] ; This needs to change
;type=peer
;host=127.0.0.1
;secret=nunya
;auth=md5
;disallow=all
;allow=gsm
;transfer=no

#includeifexists custom/iax.conf

And below is the extensions.conf file content:-

; WARNING - THIS FILE WAS AUTOMATICALLY CONFIGURED FROM A
; TEMPLATE FILE IN /usr/local/etc/asterisk_tpl BY THE
; NODE-CONFIG.SH SCRIPT.
;
; EACH TIME THIS SCRIPT IS RUN, THIS FILE WILL BE OVERWRITTEN.
; IF YOU CHANGE ANYTHING IN THIS FILE AND RUN THE NODE-CONFIG.SH
; SCRIPT, IT WILL BE LOST.
;
; IF YOU INTEND TO USE THE NODE-CONFIG.SH SCRIPT, THEN YOU SHOULD
; MAKE MODIFICATIONS TO THE ACTUAL TEMPLATE FILES LOCATED IN
; /usr/local/etc/asterisk_tpl directory.
;
; Shown for two nodes, second node commented out.
; change ALL 53047 and 1999 (if second node used) to
; your local node numbers

; Updated 1/2019 to include additional features
; Before attempting to add features ensure they
; are not already installed

[general]

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

[globals]
HOMENPA=215

[default]
exten => i,1,Hangup

[radio-secure]
exten => 53047,1,rpt,53047
exten => 1999,1,rpt,1999

[radio-secure-proxy]
exten => 53047,1,rpt,53047|X
exten => _0X.,1,Goto(allstar-sys|${EXTEN:1}|1)

; IAXRPT Windows

[radio-iaxrpt]
exten=53047,1,Rpt,53047|X
exten => 1999,1,rpt,1999
exten => 53047,1,Answer
exten => 53047,n,Playback,rpt/node
exten => 53047,n,Playback,digits/5
exten => 53047,n,Playback,digits/3
exten => 53047,n,Playback,digits/0
exten => 53047,n,Playback,digits/4
exten => 53047,n,Playback,digits/7
exten => 53047,n,Set(CALLERID(num)=0)
exten => 53047,n,Rpt,53047|P|${CALLERID(name)} ;;; The “CallerID” from IAXRpt

; The following stanza is to be used for Android/Iphone
; connections. Please configure the node number for the
; node on this server you want to connect to.
; The callerID name is configured and returned from
; your phone. It is typically your call.

[phone-iaxrpt] ;;; Stanza is the context from iax.conf
exten => 53047,1,Answer
exten => 53047,n,Playback,rpt/node
exten => 53047,n,Playback,digits/5
exten => 53047,n,Playback,digits/3
exten => 53047,n,Playback,digits/0
exten => 53047,n,Playback,digits/4
exten => 53047,n,Playback,digits/7
exten => 53047,n,Set(CALLERID(num)=0)
exten => 53047,n,Rpt,53047|P|${CALLERID(name)} ;;; The “CallerID” from IAXRpt

; To make this have a static callerID name if your phone
; app does not support callerID change the last line to this
; and specify the name (usually CALL) in place of static-name.

;exten => 53047,n,Rpt,1998|P|“static-name”

; Autopatch example lines. Must be configured and
; SIP or IAX phone connections configured to work.

[pstn-out]
exten=_NXXNXXXXXX,1,playback(ss-noservice)
exten=_NXXNXXXXXX,2,Congestion

[invalidnum]
exten=s,1,Wait,3
exten=s,n,Playback,ss-noservice
exten=s,n,Wait,1
exten=s,n,Hangup

[radio]
exten=_X11,1,Goto(check_route|${EXTEN}|1);
exten=_NXXXXXX,1,Goto(check_route|1${HOMENPA}${EXTEN}|1)
exten=_1XXXXXXXXXX,1,Goto(check_route|${EXTEN}|1)

[check_route]
; no 800
exten=_1800NXXXXXX,2,Goto(invalidnum|s|1)
exten=_1888NXXXXXX,2,Goto(invalidnum|s|1)
exten=_1877NXXXXXX,2,Goto(invalidnum|s|1)
exten=_1866NXXXXXX,2,Goto(invalidnum|s|1)
exten=_1855NXXXXXX,2,Goto(invalidnum|s|1)
; no X00 NPA
exten=_1X00XXXXXXX,2,Goto(invalidnum|s|1)
; no X11 NPA
exten=_1X11XXXXXXX,2,Goto(invalidnum|s|1)
; no X11
exten=_X11,2,Goto(invalidnum|s|1)
; no 555 Prefix in any NPA
exten=_1NXX555XXXX,2,Goto(invalidnum|s|1)
; no 976 Prefix in any NPA
exten=_1NXX976XXXX,2,Goto(invalidnum|s|1)
; no NPA=809
exten=_1809XXXXXXX,2,Goto(invalidnum|s|1)
; no NPA=900
exten=_1900XXXXXXX,2,Goto(invalidnum|s|1)

; okay, route it
exten=_1NXXXXXXXXX,1,Goto(pstn-out|${EXTEN:1}|1)
exten=_X.,2,Goto(invalidnum|s|1)

; End autopatch example

; Following stanza required for web transceiver access

[allstar-public]

exten => s,1,Ringing
exten => s,n,Set(RESP=${CURL(https://register.allstarlink.org/cgi-bin/authwebphone.pl?${CALLERID(name)})})
exten => s,n,Set(NODENUM=${CALLERID(number)})
exten => s,n,GotoIf($["${RESP:0:1}" = “?”]?hangit)
exten => s,n,GotoIf($["${RESP:0:1}" = “”]?hangit)
exten => s,n,GotoIf($["${RESP:0:5}" != “OHYES”]?hangit)
exten => s,n,Set(CALLSIGN=${RESP:5})
exten => s,n,Wait(3)
exten => s,n,Playback(rpt/node|noanswer)
exten => s,n,Saydigits(${NODENUM})
exten => s,n,Set(CALLERID(num)=0)
exten => s,n,Set(CALLERID(name)=${CALLSIGN})
exten => s,n,Rpt(${NODENUM}|X)
exten => s,n,Hangup
exten => s,n(hangit),Answer
exten => s,n(hangit),Wait(1)
exten => s,n(hangit),Hangup

exten => 9999,1,Goto(allstar-public|s|1)

; end web transceiver stanza

; Following stanza required for phone access

[allstar-sys]

exten => _x.,1,Ringing
exten => _x.,n,Wait(3)
exten => _x.,n,Answer
exten => _x.,n,Playback(rpt/node)
exten => _x.,n,Saydigits(${EXTEN:1})
exten => _x.,n,Rpt(${EXTEN:1}|P|${CALLERID(name)}-P)
exten => _x.,n,Hangup

; end phone access stanza

; The blacklist and whitelist stanzas below are used to allow or ban nodes
; from connecting. Only one can be selected at a time as defined in the
; [radio] stanza of iax.conf
;
; The best way to allow or ban nodes from the database is to
; use the Supermon application or the node-ban-allow.sh script.
;
; No changes need to be made to these stanzas. See comments in iax.conf.

[blacklist]
exten => _XXXX!,1,NoOp(${CALLERID(num)})
exten => _XXXX!,n,GotoIf($[${DB_EXISTS(blacklist/${CALLERID(num)})}]?blocked)
exten => _XXXX!,n,Goto(radio-secure,${EXTEN},1)
exten => _XXXX!,n(blocked),Hangup

[whitelist]
exten => _XXXX!,1,NoOp(${CALLERID(num)})
exten => _XXXX!,n,NoOp(${IAXPEER(CURRENTCHANNEL)})
exten => _XXXX!,n,GotoIf($["${IAXPEER(CURRENTCHANNEL)}" = “127.0.0.1”]?radio-secure,${EXTEN},1) ;permit local IPs
exten => _XXXX!,n,GotoIf($[${DB_EXISTS(whitelist/${CALLERID(num)})}]?radio-secure,${EXTEN},1)
exten => _XXXX!,n,Hangup

; Stanza to get node number and pass to saydns.sh script in rpt.conf
[saydns]
exten => _xxx.,1,System(/usr/local/sbin/saydns.sh ${EXTEN})
exten => _xxx.,n,Hangup()

; Example connection to another Asterisk server
; and passing an extension

; [pbx_server]
;exten => _1NXXNXXXXXX,1,Dial(IAX2/pbx/${EXTEN})
;exten => _NXXNXXXXXX,1,Dial(IAX2/pbx/${EXTEN})
;exten => _NXX,1,Dial(IAX2/pbx/${EXTEN})
;exten => _NX,1,Dial(IAX2/pbx/${EXTEN})

#includeifexists custom/extensions.conf

Looks like you have a typo in that stanza in extensions.conf

[radio-iaxrpt]
exten=>53047,1,Rpt,53047|X

should actually be all you need.

Many thanks for your help.
Unfortunately, still the same 45 seconds and drops off.
Also did a full reboot after the edit.

Now can you tell me if you are referring to windows iaxrpt or android iaxrpt

and which of the users and context you are using that is giving you the problem

I can see plenty of ‘potential’ problems. But let’s work with your problem.

Hi Mike.
Thanks for the patience here.
All of the iaxrpt clients do the same but for simplicity I’ll stick with Windows client.
I use:-
Account name: 53047
Description: Allstar
Host: 192.168.1.97
Username: myphone-iaxrpt
Password: same as [myphone-iaxrpt] secret=mypassword

Can you connect to node 48335… I have it as stand alone right now.

I want to check a couple of things with your set-up in ‘suspicion’.

Use your iaxrpt to initiate the connection. Give me a moment to reply.

Hi.

I’m getting connection failed on your node.
Can connect to others fine.

Daren

I might suggest the following conf if it is just you as the admin.

iax conf

[wiaxuser]
type = user
context = wiax
auth = md5
secret = passw
host = dynamic
disallow = all
allow = ulaw
allow = adpcm
allow = gsm
notransfer = yes

and for the ext conf, use your node numbers.

[wiax]
exten => 29284,1,rpt(29284|X)
exten => 29285,1,rpt(29285|X)
exten => 48335,1,rpt(48335|X)

your win iaxrpt would be
account name = (node #)
user = wiaxuser
pass = passw

The scheme you are using is more for multi outside users and ability to ID them in the system.
Keep it simple stupid -KISS it.

That scheme above will allow you to fully connect and control each node with full transparency.
No time-out.

Likely, you have been floating around with NOCID and being disconnected by link inactivity timer.
It requires you create a proper name of ‘callsign’ for users. And your scheme is not doing that.
Just a guess.

Many thanks, I’ll try this.
Would this still work with a connected radio?
I’ve plans to connect a R1 interface with my Motorola as a node radio.
Really appreciate your help.

Think of it as a magic window. At least the set-up I listed. Not intended for outside users. Just admin and/or a very trusted admin(s).

You make the connection to a node. You are now ‘the node’.

You can not see the connection from allmon , supermon etc.and you can’t boot them off by command either. At least not with a asl command. Asterisk and OS is new story.

The scheme you had about half of is for a user entry system. Allowing outside users to log-in and be counted and visible as a user to a node at a time. With CID, they would be visible and seen in allmon or the connection list and can be booted off by command.

I would suggest you remove any entries in iax.conf and extension.conf that are not being used or at least comment them out in their entirety. Security being the top issue but not the only one.
But it does make it easier to understand at a minimum.

oh… yes, it would not change anything if the node is connected to any radio interface of any type.
Your connection is iax2

All connects and does display on supermon2 when I connect but still disconnected after 45 seconds.
Mmm…

If you are using HAMVOIP, you will need to check with their support.
That is not how it would act with standard ASL if you used the stanza/setup I provided.

Hope you are well.
Many thanks for your help, it really is appreciated.

I think I may have found something that may help, hopefully.
Connecting with iaxRpt and using myphone-iaxrpt it disconnected as usual
after the 45 seconds.
However if I remove the callsign in Preferences>CallerID and leave number as
0 it stays connected.
It’s the callsign that’s causing the issue.
Does that help in the problem please?

If you are using the stanza’s I put forth above, you do not need or want a caller ID in iaxrpt.
‘0’/default in that case is fine. I do not use anything and never have as admin.
Again, those stanzas are for admin/sysop .

There can be other reasons for using it. Not this one.