SIP Trunk issues

Share your tips, tricks and best practise ideas for Fongo services in here!
silicone
Just Passing Thru
Posts: 3
Joined: 11/08/2011
ISP Name: 3web
Computer OS: Win7
Router: Linksys

SIP Trunk issues

Post by silicone »

I was happily using freephoneline with asterisk last year and now something has changed that I can't nail down.

I can place calls but not receive any - they go straight to voicemail. Here's the call log.
Duration Connect time Disconnect time Disconnect reason City Cost
0:04 2014-05-18 15:45 2014-05-18 15:45 Normal call clearing $0.00
0:04 2014-05-18 15:45 2014-05-18 15:45 Unallocated (unassigned) number

Freephoneline said they're not responsible for the problem and refuse support obviously on unsupported devices or software. However, I know this worked perfectly well last year with this same configuration I tried today. They've obviously made some type of change like incoming calls made from different or varying IP's, or some difference in authentication but they wouldn't tell me.

If anyone can help direct me on how to troubleshoot this it would be appreciated. The installation is on the router itself (openwrt) which historically bypassed any issues with ports or NAT with the firewall.

{sip.conf}
[general]
context=default-incoming-call-context
allowoverlap=yes
allowtransfer=yes
realm=asterisk
bindaddr=0.0.0.0
srvlookup=yes
maxexpiry=600
minexpiry=60
defaultexpiry=300
qualifyfreq=55
disallow=all
allow=ulaw
allow=alaw
dtmfmode = inband
alwaysauthreject = yes
t1min=100
timert1=500
timerb=16000
rtptimeout=600
rtpkeepalive=30
useragent=PBX
localnet=192.168.0.0/16
localnet=10.0.0.0/8
localnet=172.16.0.0/12
nat=yes
directmedia=no
sipdebug=no



#include sip_registrations.conf
register => 1604*******:secret@peer-1604*******_voip_freephoneline_ca

[authentication]

#include sip_peers.conf
[peer-1604*******_voip_freephoneline_ca]
type = peer
defaultuser = 1604*******
fromuser = 1604*******
secret = secret
host = voip.freephoneline.ca
fromdomain = voip.freephoneline.ca
context = context-incoming-1604*******_voip_freephoneline_ca
insecure = port,invite
qualify = 2000

#include sip_users.conf[1000]
fullname = V|FULLNAME|L
defaultuser = 1000
secret = secret
hassip = yes
hasvoicemail = no
host = dynamic
type = friend
context = context-user-1000
qualify = no

Again - the pbx registers with freephoneline and makes outgoing calls just fine (so my extension is working fine as well). I've tried different things but don't know what to do from here.
User avatar
Jake
Technical Support
Posts: 2837
Joined: 10/18/2009

Re: SIP Trunk issues

Post by Jake »

It's probably your timers that is causing the server to refuse your registration. You are probably finding you are get 401 errors in your logs.

Change your min, max, and default timers to 3600.
Your registrationtimeout should be 120, but I don't see that setting in your list.

They have started to block connections that try and register too frequently as it was dragging the server down for everyone. The blocks clear after about 20 minutes, so change the timers and leave it powered down for about 20 minutes and see if the new timer settings help.
drsilicone
One Hit Wonder
Posts: 1
Joined: 05/25/2014
SIP Device Name: Asterisk
Computer OS: WIn 8.1
Router: BUffalo WZR-HP-G300NH

Re: SIP Trunk issues

Post by drsilicone »

So I've adjusted those timers and still no success. I've managed to collect this log report which might give someone knowledgeable a hint. Again - I can make outgoing calls no problem but incoming goes straight to FPL voicemail. I was surprised to actually get the following log showing the call does get to asterisk and then gets rejected apparently.

Code: Select all

<------------>
Scheduling destruction of SIP dialog 'E3DE8E9A@208.72.120.66~o~o' in 9344 ms (Me
thod: INVITE)

<--- SIP read from UDP:98.143.96.126:5060 --->
INVITE sip:16042835541@98.143.96.126:5060;transport=UDP SIP/2.0
Record-Route: <sip:16042835541@98.143.96.126;lr=on>
Via: SIP/2.0/UDP 98.143.96.126;branch=z9hG4bK0581.48a3d004.1
Via: SIP/2.0/UDP 208.65.240.165:5060;branch=z9hG4bK-d8754z-7cbd9e189c5d2544-1---
d8754z-;rport=5060
Via: SIP/2.0/UDP 208.65.240.165:5061;branch=z9hG4bK-ir2y7wgxuvvjw3tz;rport=5061
Max-Forwards: 69
Record-Route: <sip:208.65.240.165:5060;lr;transport=UDP>
Contact: "Anonymous"<sip:208.65.240.165:5061>
To: <sip:16042835541@208.65.240.165>
From: <sip:6043402705@208.65.240.165>;tag=ywxs54c2axd7d5oe.o
Call-ID: E3DE8E9A@208.72.120.66~o~o
CSeq: 609 INVITE
Expires: 300
Content-Disposition: session
Content-Type: application/sdp
User-Agent: Sippy
h323-conf-id: 1422437086-3834581475-2284322843-559912524
cisco-GUID: 1422437086-3834581475-2284322843-559912524
Content-Length: 149

v=0
o=Sippy 115242840 0 IN IP4 208.65.240.165
s=-
t=0 0
m=audio 41356 RTP/AVP 0 101
c=IN IP4 208.65.240.142
a=rtpmap:101 telephone-event/8000
<------------->
--- (19 headers 7 lines) ---
Sending to 98.143.96.126:5060 (NAT)
Sending to 98.143.96.126:5060 (NAT)
Using INVITE request as basis request - E3DE8E9A@208.72.120.66~o~o
Found peer 'peer-16042835541_voip2_freephoneline_ca' for '6043402705' from 98.14
3.96.126:5060

<--- Reliably Transmitting (NAT) to 98.143.96.126:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 98.143.96.126;branch=z9hG4bK0581.48a3d004.1;received=98.143.96.
126;rport=5060
Via: SIP/2.0/UDP 208.65.240.165:5060;branch=z9hG4bK-d8754z-7cbd9e189c5d2544-1---
d8754z-;rport=5060
Via: SIP/2.0/UDP 208.65.240.165:5061;branch=z9hG4bK-ir2y7wgxuvvjw3tz;rport=5061
From: <sip:6043402705@208.65.240.165>;tag=ywxs54c2axd7d5oe.o
To: <sip:16042835541@208.65.240.165>;tag=as186a30ae
Call-ID: E3DE8E9A@208.72.120.66~o~o
CSeq: 609 INVITE
Server: Freephoneline
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLIS
H
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="12034c55"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog 'E3DE8E9A@208.72.120.66~o~o' in 9344 ms (Me
thod: INVITE)
Retransmitting #1 (NAT) to 98.143.96.126:5060:
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 98.143.96.126;branch=z9hG4bK0581.48a3d004.0;received=98.143.96.
126;rport=5060
Via: SIP/2.0/UDP 208.65.240.165:5060;branch=z9hG4bK-d8754z-7cbd9e189c5d2544-1---
d8754z-;rport=5060
Via: SIP/2.0/UDP 208.65.240.165:5061;branch=z9hG4bK-ir2y7wgxuvvjw3tz;rport=5061
From: <sip:6043402705@208.65.240.165>;tag=ywxs54c2axd7d5oe.o
To: <sip:16042835541@208.65.240.165>;tag=as56efaa67
Call-ID: E3DE8E9A@208.72.120.66~o~o
CSeq: 609 INVITE
Server: Freephoneline
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLIS
H
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="71c2c819"
Content-Length: 0


---

<--- SIP read from UDP:98.143.96.126:5060 --->
ACK sip:16042835541@208.65.240.44:5060;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 98.143.96.126;branch=z9hG4bK0581.48a3d004.0
Max-Forwards: 69
To: <sip:16042835541@208.65.240.165>;tag=as56efaa67
From: <sip:6043402705@208.65.240.165>;tag=ywxs54c2axd7d5oe.o
Call-ID: E3DE8E9A@208.72.120.66~o~o
CSeq: 609 ACK
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---
Retransmitting #1 (NAT) to 98.143.96.126:5060:
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 98.143.96.126;branch=z9hG4bK0581.48a3d004.1;received=98.143.96.
126;rport=5060
Via: SIP/2.0/UDP 208.65.240.165:5060;branch=z9hG4bK-d8754z-7cbd9e189c5d2544-1---
d8754z-;rport=5060
Via: SIP/2.0/UDP 208.65.240.165:5061;branch=z9hG4bK-ir2y7wgxuvvjw3tz;rport=5061
From: <sip:6043402705@208.65.240.165>;tag=ywxs54c2axd7d5oe.o
To: <sip:16042835541@208.65.240.165>;tag=as186a30ae
Call-ID: E3DE8E9A@208.72.120.66~o~o
CSeq: 609 INVITE
Server: Freephoneline
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLIS
H
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="12034c55"
Content-Length: 0


---

<--- SIP read from UDP:98.143.96.126:5060 --->
ACK sip:16042835541@98.143.96.126:5060;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 98.143.96.126;branch=z9hG4bK0581.48a3d004.1
Max-Forwards: 69
To: <sip:16042835541@208.65.240.165>;tag=as186a30ae
From: <sip:6043402705@208.65.240.165>;tag=ywxs54c2axd7d5oe.o
Call-ID: E3DE8E9A@208.72.120.66~o~o
CSeq: 609 ACK
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---

<--- SIP read from UDP:98.143.96.126:5060 --->
ACK sip:16042835541@208.65.240.44:5060;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 98.143.96.126;branch=z9hG4bK0581.48a3d004.0
Max-Forwards: 69
To: <sip:16042835541@208.65.240.165>;tag=as56efaa67
From: <sip:6043402705@208.65.240.165>;tag=ywxs54c2axd7d5oe.o
Call-ID: E3DE8E9A@208.72.120.66~o~o
CSeq: 609 ACK
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---

<--- SIP read from UDP:98.143.96.126:5060 --->
ACK sip:16042835541@98.143.96.126:5060;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 98.143.96.126;branch=z9hG4bK0581.48a3d004.1
Max-Forwards: 69
To: <sip:16042835541@208.65.240.165>;tag=as186a30ae
From: <sip:6043402705@208.65.240.165>;tag=ywxs54c2axd7d5oe.o
Call-ID: E3DE8E9A@208.72.120.66~o~o
CSeq: 609 ACK
Content-Length: 0

<------------->
--- (8 headers 0 lines) ---
WZR-HP-G300NH*CLI> hod: ACKestroying SIP dialog 'E3DE8E9A@208.72.120.66~o~o' Met
Really destroying SIP dialog 'E3DE8E9A@208.72.120.66~o~o' Method: ACK

<--- SIP read from UDP:192.168.1.130:5060 --->
NOTIFY sip:192.168.1.1 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.130:5060;branch=z9hG4bK-538e6405
From: VLTighe <sip:1000@192.168.1.1>;tag=1b6fe60f78746cc5o0
To: <sip:192.168.1.1>
Call-ID: 670bb46f-1e33f1e5@192.168.1.130
CSeq: 518 NOTIFY
Max-Forwards: 70
Event: keep-alive
User-Agent: Freephoneline
Content-Length: 0

<------------->
--- (10 headers 0 lines) ---

<--- Transmitting (NAT) to 192.168.1.130:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.130:5060;branch=z9hG4bK-538e6405;received=192.168.1.1
30;rport=5060
From: VLTighe <sip:1000@192.168.1.1>;tag=1b6fe60f78746cc5o0
To: <sip:192.168.1.1>;tag=as71209551
Call-ID: 670bb46f-1e33f1e5@192.168.1.130
CSeq: 518 NOTIFY
Server: Freephoneline
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLIS
H
Supported: replaces, timer
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '670bb46f-1e33f1e5@192.168.1.130' in 32000
ms (Method: NOTIFY)

<--- SIP read from UDP:192.168.1.130:5060 --->
REGISTER sip:192.168.1.1 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.130:5060;branch=z9hG4bK-bf13e86e
From: VLTighe <sip:1000@192.168.1.1>;tag=1b6fe60f78746cc5o0
To: VLTighe <sip:1000@192.168.1.1>
Call-ID: d97006b7-ae0e843d@192.168.1.130
CSeq: 71 REGISTER
Max-Forwards: 70
Authorization: Digest username="1000",realm="asterisk",nonce="49386e9a",uri="sip
:192.168.1.1",algorithm=MD5,response="561c6e3276d01ddb1ec14aed43d67763"
Contact: VLTighe <sip:1000@192.168.1.130:5060>;expires=300
User-Agent: Linksys/PAP2-3.1.6(LS)
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: x-sipura