Calls not routing; Asterisk running on Synology diskstation

I wonder if anyone has any insight working with Asterisk on a Synology nas. I’m trying to set up inbound and outbound calling but am having problems. My main problem is getting inbound calls to route to an extension. Local switching between extensions is working fine (physical IP handsets), and my trunks are showing as registered with Sipgate, but when an external call hits the Asterisk box it doesn’t go anywhere regardless of what inbound routes I try - have tried using a ‘catch all’ route and also a specific route with my number in the DID, but the calls fail to connect to an extension and I can’t see any error messages anywhere.
Asterisk GUI-version : 2.1.0-rc1
Sip dialog below, can anyone see any obvious problems? (numbers have been altered slightly to protect the innocent;)
[color=#0000BF]<— SIP read from UDP: —>
INVITE sip:s@ SIP/2.0
Record-Route: sip:;lr;ftag=as0785e8b8
Record-Route: sip:;lr=on
Record-Route: sip:;lr;ftag=as0785e8b8
Via: SIP/2.0/UDP;branch=z9hG4bK46f5.6b541091.0
Via: SIP/2.0/UDP;branch=z9hG4bK46f5.6b541091.0
Via: SIP/2.0/UDP;received=;branch=z9hG4bK15e50793
Via: SIP/2.0/UDP;received=;branch=z9hG4bK15e50793;rport=5060
Max-Forwards: 67
From: “07957123456”;tag=as0785e8b8
Contact: sip:07957123456@
CSeq: 102 INVITE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 467

o=root 759523207 759523207 IN IP4
s=sipgate VoIP GW
c=IN IP4
t=0 0
m=audio 58172 RTP/AVP 8 0 3 97 18 112 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=30
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:112 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -

— (18 headers 21 lines) —

Sending to (NAT)

Using INVITE request as basis request -

Found peer ‘4153553’ for ‘07957123456’ from

<— Reliably Transmitting (NAT) to —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP;branch=z9hG4bK46f5.6b541091.0;received=;rport=5060
Via: SIP/2.0/UDP;branch=z9hG4bK46f5.6b541091.0
Via: SIP/2.0/UDP;received=;branch=z9hG4bK15e50793
Via: SIP/2.0/UDP;received=;branch=z9hG4bK15e50793;rport=5060
From: “07957123456”;tag=as0785e8b8
CSeq: 102 INVITE
Server: Asterisk PBX
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="7bdf4623"
Content-Length: 0


Scheduling destruction of SIP dialog '’ in

32000 ms (Method: INVITE)

<— SIP read from UDP: —>
ACK sip:s@ SIP/2.0
Via: SIP/2.0/UDP;branch=z9hG4bK46f5.6b541091.0
Via: SIP/2.0/UDP;branch=z9hG4bK46f5.6b541091.0
From: “07957123456”;tag=as0785e8b8
CSeq: 102 ACK
Max-Forwards: 69
Content-Length: 0
X-hint: rr-enforced[/color]

We need the complete sip debug of the call.

insecure=invite on the sipgate entry. If they have told them to use insecure=very, please tell them that that is no longer recognized and most people only need invite, not both port and invite. (The name was probably changed because if was being misused, but it is still being misused, even with the two insecurities

This ignores the Synology element of the problem and assumes they are using a currently supported version of Asterisk.

Thanks for the responses.

david55: That’s helpful - I changed the sipgate trunk to INVITE and am now getting this:
[Jan 14 23:17:47] NOTICE[8382]: chan_sip.c:22718 handle_request_invite: Call from ‘4153553’ ( to extension ‘s’ rejected because extension not found in context ‘DID_4153553’

Which is at least an error message I can work with so thank you :smile:

navaismo: That was all the info that popped up in the CLI when I made the inbound call; not sure how to get any more debug info than that to be honest. I’m a newbie with Asterisk, I’ve built a couple of trixboxes and I like working with Freepbx but I’m an Asterisk amateur still really - all advice is greatly appreciated!

Thanks both I’ll post back if I get this working.



Getting s means you don’t have a true direct in dialing service. The VoIP community misuses DID to describe something that is direct in dialing to the ITSP but not the customer, i.e. pretty much any incoming line from the PSTN over SIP. Just treat it as you had DID with one line, numbered “s”.

Well I managed to get calls coming through now using the advice here:

You need to enable SSH access to your NAS - you can google instructions on that, then go to the directory where the asterisk config files are kept (should be something like /volume1/@appstore/Asterisk/etc/asterisk) then edit your extensions.conf

[quote]DiskStation> pwd
DiskStation> grep “Goto(default” *

extensions.conf:;exten = s,1,Goto(default|6000|1)
extensions.conf:exten = s,1,Goto(default,6000,1)[/quote]
I changed the line in my extensions.conf to exten = s,1,Goto(default,3837,1)
3837 being one of the extensions connected to my network. This is great and means I can actually get inbound calls. Now I just need to work out how to route calls coming in on specific Sipgate trunks(DDI’s) to specific extensions on the network! shouldn’t be too difficult as soon as I get some spare time.
Thanks for the pointers all :smiley:

p.s. Just as an extra hint for anyone who found this thread; once you have SSH access to your Synology NAS running Asterisk you can get debug info by switching to directory /volume1/@appstore/Asterisk/sbin/
Then run
./asterisk -vvvvvr


I just wanted to thank [color=#40BF00]phon3y [/color]for his valued advice. I looked for hours for both finding a way to see Asterisk’s log in Synology as well as solving the inbound calls not ringing.
Two birds in one post :smile: