Problem with Simplest Internal SIP setup

I have installed the QNAP qPKG for Asterisk 1.4 and cannot get the most basic connection to work.

the QNAP device and 2 PCs are installed on my home network.
The PCs have the 3CX phone application installed.
Both softphones can connect to Asterisk OK
USERS are setup for 6001 & 6002 and these are the same elements defined in SIP.CONF

When I try to dial ext-to-ext; or ext-to-voicemail I get 1 ring then the error “Media not supported”

extensions.conf is the simple test pattern:
[DLPPLN_Dial_Local]
exten=6001,1,Dial(SIP/6001,10)
exten=6001,n,VoiceMail(6001,u)
exten=6002,1,Dial(SIP/6002,10)
exten=6002,n,VoiceMail(6002,u)
exten=6000,1,VoiceMailMain(${CALLERID(num)},s)

CLI SIP SHOW PEERS:
Name/username Host Dyn Nat ACL Port Status
6002/6002 192.168.1.100 D N 2927 Unmonitored

The 3CX software has the PCMA, PCMU & GSM Codecs

SIP.CONF (below) is the default that was installed with the ALLOW changed as the error seemed to imply that it was something to do with the CODEC.

I would be grateful if anybody could point out what must be the obvious mistake here, as I am at a complete loss staring at this when all the guides seem to assume this is pretty much a “gimme” straight out of trhe box.

Thanks

[General]
context=default
allowoverlap=no
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes
allowexternaldomains=yes
allowguest=yes
allowsubscribe=yes
allowtransfer=yes
alwaysauthreject=no
autodomain=no
callevents=no
canreinvite=nonat
checkmwi=10
compactheaders=no
defaultexpiry=120
domain=
dtmfmode=
dumphistory=no
externhost=myactual.homeip.net ;from dynDNS
externrefresh=60
fromdomain=
g726nonstandard=no
jbenable=no
jbforce=no
jbimpl=
jblog=no
jbmaxsize=
jbresyncthreshold=
language=
localnet=192.168.0.0/255.255.255.0
maxcallbitrate=384
maxexpiry=3600
minexpiry=60
mohinterpret=default
mohsuggest=
nat=route
notifyringing=yes
pedantic=no
progressinband=never
promiscredir=no
realm=Asterisk
recordhistory=no
registerattempts=0
registertimeout=20
relaxdtmf=no
rtpholdtimeout=
rtptimeout=
sendrpid=no
sipdebug=no
subscribecontext=
t1min=100
t38pt_udptl=no
tos_audio=none
tos_sip=none
tos_video=none
trustrpid=no
useragent=Asterisk PBX
usereqphone=no
videosupport=no
disallow=all
allow=ulaw
allow=alaw
allow=gsm
allow=speex
[Authentication]

  • Blank -
    [6002] ; & the same for 6001
    type=friend
    context=DLPN_Dial_Local
    secret=1234
    host=dynamic

Your extensions.conf is invalid and there is no such file as SIP.CONF, only sip.conf. However, the sip show peers and the nature of the failure suggest that those problems don’t exist in the real system. (= should be => in extensions.conf).

The easiest way of progressing this is if you use sip set debug on, and then look at the SDP exchange and the associated debug output.

Also note that this configuration is very vulnerable to hacking, if anyone gets past your outer defences. You have allowguest=yes and your device names are easily guessable.

Finally note that, since April 21st no further non-security bugs will be fixed in Asterisk 1.4 (I don’t think the people who made this policy understood that the open source Asterisk market has changed and now people are using packages, which tend to be very out of date).

David, thank you for the suggestions:

I have had moments of success where I have heard the default recording, and even been asked to record a voicemail but the results are not repeatable or consistent so I will do some more testing and come back with anything more concrete.

On the initial pointers:

  • I am not sure if this is something to do with the included GUI, but all the default entries in extensions.conf use “=” instead of “=>” and if I add anything with “=>” it gets saved as a plain “=” As you say, I don’t think this is the issue as whatever version this is, it seems to be working with the “=” - at least in as much as what gets shown in the GUI.

  • The AllowGuest was an act of desparation, but thanks to your remark has been quickly reverted.

Rgds

I have made progress by un-installing / re-installing Asterisk completely and following a simple guide I found online that simply does not refer to the GUI at all - as trying to mix’n’match was clearly confusing me.

I have two SIP devices defined, both can hear the default welcome message and echo test, with one working on my internal network and one from outside over the internet.

The current hurdle is setting up voicemail:

  • Both devices in sip.conf have mailbox=1000@default defined - although I am understanding this is just for message light
  • Voicemail.conf has 1000=1234,Name,Email@host.com in the default context

But I cannot get any reaction from either VoiceMail or VoiceMailMain

Different guides have different command formats for voicemail - for Asterisk 1.4 is it:
exten => 888,1,Voicemail,b1000
exten => 888,1,VoiceMail(b1000)
exten => 888,1,VoiceMail(1000,b)
exten => 888,1,VoiceMail(1000|b)

exten => 777,1,VoicemailMain,u1000
exten => 777,1 VoicemailMain(1000,u)

But then again, I have tried them all, and I just get connected and then hangup - no instructions, no announcements, nada.

  1. Is there any other format that should be used, or have I missed out anything in the basic configuration that would be causing voicemail to simply not be there ?

  2. Assuming I can get over this hurdle, the next would be what/where are the settings that would allow the voicemail email notication to be handled by my ISP SMTP server - which does allow this type of relaying with a properly authenticated request.

Again, any assistance would be greatly appreciated.


Command>voicemail show users

Context Mbox User Zone NewMsg
default general New User 0
default 1000 Ian 0
other 1234 Company2 User 0

Name/username Host Dyn Nat ACL Port Status
2000/2000 xxx.xxx.xxx.xxx D N 23470 OK (63 ms)
1000/1000 (Unspecified) D 0 Unmonitored
2 sip peers [Monitored: 1 online, 0 offline Unmonitored: 0 online, 1 offline]

Moved forward with the log showing :
channel.c: Unable to find a codec translation path from 0x2 (gsm) to 0x100 (g729)
file.c: Unable to open vm-youhave (format 0x2 (gsm)): No such file or directory

Looking in the sounds folder there are only .g729 files for all the VM-* messages

By renaming another .gsm to vm-youhave.gsm, the voicemail dialplan now says “You Have” and then hangs up, with the log showing:
Unable to open vm-no (format 0x2 (gsm)): No such file or directory

So that seems to be the first issue on it’s way - I need to install the standard messages for the supported SIP codecs - although it seems odd that the “packaged” solution is doomed to fail as I understand for any g729 translation I would need to buy a license.

For the second issue - getting the ISP SMTP working to send the VM alerts - I wold still appreciate any pointers.

Rgds

I found the required sound files (free) at voicevector.com/

The email notification worked with the following changes - and may have worked with the original sendmail default if other things had been in place properly to start with, but when I found QNAP didn’t install sendmail and linked the command to ssmtp I cut out that translation and continued with ssmtp directly:

  • add user/pwd for ISP authentication to SSMTP.CONF (not an asterisk file)
  • mailcmd=/usr/sbin/ssmtp -t
  • messagebody ended with /n/n

Internal SIP clients show the message waiting indicator, but not over the internet.

I am having similar issues with the Qnap asterisk setup. I cant get voicemail to work, I just clears the call instead of recording anything, and clears when you ring the voice mail ext. I have an asterisk sever on another machine to test with, but everything works fine with the same settings. I am using siemens openstage and optiset handsets. I find it hard to believe that the qpkg has been out for so long and others have not had problems like this. b At least you have given me a couple of ideas to work on.

Thanks

Adrian