[NZLUG] asterisk - register a trunk with 2talk without a username

Roger Searle roger.searle at gmail.com
Wed Jan 14 15:33:44 NZDT 2015


Hi everyone, I am on an asterisk learning curve, can anyone help me move 
up it?  I have a "Yeastar MyPBX Standard" IP PBX (1) which is asterisk 
underneath. While internal and outbound calls are working OK, I can not 
get a VOIP trunk to register with 2talk, so when calling our pilot 
number receive a busy signal.  No authentication is required for 
registering a trunk with peering.2talk.co.nz, none are set within the 
web gui provided by MyPBX.  The connection is via a static IP address, 
all ports from that address are open on the PBX, and currently the 
router has the PBX's IP address in it's DMZ (yes i'm aware of the 
security implications here, I will come back to this later).

After several tickets with 2talk we know that they can send traffic to 
the PBX, but it rejects the INVITE and continues to insist on sending 
authentication info, so say that editing of sip.conf (2) to remove any 
authentication info is what I should do next. Unfortunately there do not 
appear to be such lines in that file but include below in case it is 
helpful.  I can however match up the authentication issue between the 
PBX logs and siptrunk.conf.

 From the logs, I have repeats of the following every 2 minutes:

[2015-01-14 14:22:24] NOTICE[1860] utils.c: 
======host:peering.2talk.co.nz update dns: 27.111.14.66======
[2015-01-14 14:22:32] NOTICE[1860] utils.c: ======host:MyPBX update dns: 
127.0.0.1======
[2015-01-14 14:22:36] NOTICE[1913] chan_sip.c: 
username:@peering.2talk.co.nz:5060 register
[2015-01-14 14:22:36] WARNING[1912] chan_sip.c: Forbidden - wrong 
password on authentication for REGISTER for '@peering.2talk.co.nz:5060' 
to 'peering.2talk.co.nz'
[2015-01-14 14:22:48] NOTICE[1912] chan_sip.c: Failed to authenticate 
device 17<sip:17 at 103.x.y.z>;tag=35778e4d

On the PBX, there is this:

root at MyPBX:~# cat /etc/asterisk/siptrunk.conf
[trunk-2talk]
callback=
username=@peering.2talk.co.nz:5060
hostname=peering.2talk.co.nz
authuser=
md5secret=8d817e7e744c0535e9b50328c....
peername=
transport=1
portnum=5060

I thought if I edit this file to comment out username and md5secret (or 
have with no data following the '=') and reload the SIP trunks that I 
may be able to successfully register the trunk.  While I can edit/save 
and then cat the file to see the changes, this doesn't work, the same 
errors continue in the logs, and any edits (or backup copies of files) 
in this folder do not survive rebooting of the PBX.  Using the web gui 
to update settings definitely updates these files, but it seems I can 
not edit the files directly?

So for some questions: how is the register string that is sent to 2talk 
being created?  Why are the files in /etc/asterisk/ being recreated each 
reboot - or, where would the files be that CAN be edited so they survive 
the reboot? (and hopefully get a successful trunk registration)

Any pointers on where to go or what to look for would be very much 
appreciated :)

Mean time, I will continue googling...

Regards
Roger


(1) http://nicegear.co.nz/phone-systems/yeastar-mypbx-standard-v6/

(2)
root at MyPBX:~# cat /etc/asterisk/sip.conf
[authentication]
[general]
udpbindaddr=0.0.0.0:5060
tcpenable=no
tcpbindaddr=0.0.0.0:5060
tlsenable=no
tlsbindaddr=0.0.0.0:5061
tlscertfile=/persistent/etc/certificates/asterisk/asterisk.pem
tlscapath=/persistent/etc/certificates/trusted
tlsdontverifyserver=yes
tlsverifyclient=no
tlsignorecommonname=yes
tlsclientmethod=sslv2
tlscipher=ALL
match_auth_username=yes
dtmfmode = rfc2833
maxexpiry = 3600
minexpiry = 60
defaultexpiry = 120
registerattempts = 0
registertimeout = 20
videosupport = yes
canreinvite = yes
disallow = all
allow = ulaw,alaw,gsm,h261,h263,h263p,h264
context = default
notifyringing = yes
notifyhold = yes
limitonpeers = yes
tos = 0x68
permit = 0.0.0.0/0.0.0.0
allowexternaldomains = no
allowexternalinvites = no
allowguest = no
allowoverlap = yes
allowsubscribe = yes
allowtransfer = yes
alwaysauthreject = no
Subscribecontext = default
autodomain = no
callevents = no
compactheaders = no
dumphistory = no
g726nonstandard = no
allowsubscribe = yes
ignoreregexpire = no
jbenable = no
jbforce = no
jblog = no
pedantic = no
promiscredir = no
recordhistory = no
relaxdtmf = no
rtcachefriends = no
rtptimeout = 1800
rtsavesysname = no
rtupdate = no
sendrpid = no
sipdebug = no
srvlookup = no
t1min = 100
trustrpid = no
usereqphone = no
progressinband = no
useragent = MyPBX
maxcallbitrate = 384
session-timers = accept
session-expires = 1800
session-minse = 90
session-refresher = uas
callingcodecpriority = yes
nat = yes
tos_sip = cs3
tos_audio = ef
tos_video = af41
cos_sip = 3
cos_audio = 5
cos_video = 4
constantssrc = yes
maxregistererrors = 8




More information about the NZLUG mailing list