Basic configuration issue ( internal calls and voicemail )

Hello,

I am new here, and i am not familiar with asterisk and freepbx, i’ve just started a project that consist of the deployment of a telephony solution inside an aircraft, with SIP trunking to allow calls from and to ground.

First, sorry for my english, i am french ( :stuck_out_tongue: ) I will to try to explain the best as possible my issue :

  • I have already done some tests with juste asterisk ( 13 LTS on a debian stretch ) and do some configurations to have some internal call, voicemail, and siptrunk. I quickly saw that it is not a good way, and it is better to use a frontend to manage asterisk -> freepbx
  • I have installed freepbx on 2 VMs : one with debian 9 and asterisk 16LTS + FreePBX 15 compiled and installed with the procedure given on the freepbx wiki. Another VM installed directly with the official ISO ( centos based)

I have read the freepbx to try to configure just internal calls but , as I said the subject is new for me, I wasnt able to do a call between 2 SIP client ( linphone on desktop + linphone android ).

The call happens, but there is no sound between each SIP client. Here is what I have done :

  • I have added 2 extensions with type = pjsip , 1001 and 1002 ( secret 0000 just for test )
  • I have added an outbound route with dial pattern 1XXX

With this, I am able to register my 2 SIP clients on the server, and make a call. But when I answer the call, there is no sound.

If I use my third VM with debian stretch and asterisk 13 LTS , It works well, I have just declared two phone in sip.conf , and a context in extension.conf like this :

sip.conf :

[1000]
type=friend
context=internal
host=dynamic
secret=0000
disallow=all
allow=ulaw

extension.conf :
[internal]
exten =>
_1XXX,1,Dial(SIP/${EXTEN},10)
same => n,Hangup()

With just this, I am able to make a call and have sound to speak and hear each other.

I guess I’m wrong in FreePBX configuration, but I don’t find any basic sample to make a configuration that allow calls in internal.

Maybe can you help me ? ( a link with a configuration sample, or explain what is wrong ? )

Juste another thing :
I tried after to activate voicemail for the 2 extensions, and I hear the voicemail when I make a call without hangup. I let a message, and then I go on UCP ( user account ) and configure the portal, I can see the history of call, there is a voicemail, but if I go into voicemail panel, I have 0 message everywhere.

Thanks a lot for you help !

I runned asterisk -rvvvvv to have some logs after a voicemail, and here are the logs :slight_smile:
Recording the message

x=0, open writing: /var/spool/asterisk/voicemail/default/1001/tmp/BnOcsM format: wav, 0x7f217c077090
User hung up
Recording was 0 seconds long but needs to be at least 1 - abandoning
Spawn extension (macro-vm, s-NOANSWER, 2) exited non-zero on ‘PJSIP/1000-00000013’ in macro ‘vm’
Spawn extension (macro-exten-vm, s, 33) exited non-zero on ‘PJSIP/1000-00000013’ in macro ‘exten-vm’
Spawn extension (ext-local, 1001, 3) exited non-zero on ‘PJSIP/1000-00000013’
Executing [h@ext-local:1] Macro(“PJSIP/1000-00000013”, “hangupcall,”) in new stack
Executing [s@macro-hangupcall:1] GotoIf(“PJSIP/1000-00000013”, “1?theend”) in new stack
Goto (macro-hangupcall,s,3)
Executing [s@macro-hangupcall:3] ExecIf(“PJSIP/1000-00000013”, “0?Set(CDR(recordingfile)=)”) in new stack
Executing [s@macro-hangupcall:4] NoOp(“PJSIP/1000-00000013”, " montior file= ") in new stack
Executing [s@macro-hangupcall:5] GotoIf(“PJSIP/1000-00000013”, “1?skipagi”) in new stack
Goto (macro-hangupcall,s,7)
Executing [s@macro-hangupcall:7] Hangup(“PJSIP/1000-00000013”, “”) in new stack
Spawn extension (macro-hangupcall, s, 7) exited non-zero on ‘PJSIP/1000-00000013’ in macro ‘hangupcall’
Spawn extension (ext-local, h, 1) exited non-zero on ‘PJSIP/1000-00000013’

I see there is 0 second recording, even I speak for 10 seconds. I have done a watch ls -l into the directory

/var/spool/asterisk/voicemail/default/1001/tmp ( 1001 is the number of the receiver of the voicemail )

and I see a temp file with 0 bytes and the same file with .wav extension with 44 bytes ( 44 is the size of the wav header ).

So I guess that the sound does not going from the SIP client to the server, that is why I cannot speak between to SIP client. That is why I don’t have voicemail too. That is why I cannot configure the voicemail with *97.

Maybe I’m wrong in my configuration, I have just a fresh install of FreeBPX, juste add two pjsip extents, and one outbound route with 1XXX pattern , nothing else.

Is missing something important ? maybe an inbound route ? But I don’t know how to configure it, I don’t find any basic configuration example inside freepbx documentation.

Thanks a lot.

@filsif This sounds like a fun project! I’ll first just start off by saying that 90% of VoIP problems are network related. Please double check that your Network is setup correctly. Are you running NAT? What does the setup look like? If you are running NAT, make sure you follow this guide: https://wiki.freepbx.org/display/FPG/NAT+Configuration+FreePBX+12

thank you for your answer.

My server is inside a debian 9 VM(VBox ) hosted by Windows 10. The network interface is bridged to the host NIC.

Both windows 10 host and debian 9 VM are on the same network, 192.168.1.0/24 and both can access to the internet with my router ( I work at home because french sanitary containment ).

My phone is connected to the same network with the wifi.

IP linux : 192.168.1.14/24
IP windows : 192.168.1.10/24
IP phone : 192.168.1.13/24

I never use NAT for network sharing between host and VM because of constraints ( I usually use multicast stream for my work and multicast over NAT is complicated to route ), I always use bridge. The only inconvenient is on business network, it see 2 Mac address, and it can block the port.

There is no firewall activated nor on windows 10 neither on debian 9.

As I said previously, it works well with another VM just with asterisk 13LTS and debian 9.

After saying that , I retry again the Asterisk 13 LTS , and I see that the incoming call comes from 1001[at]192.168.1.20 ( which is the address of my other VM ).

If I retry again with FreePBX15 + Asterisk 16 VM, the incoming call comes from 127.0.1.1 which is the loopback interface.

Maybe this is the reason why I have no sound feedback ?

I will try first to make a call between to separate SIP client and not the SIP client on the Host, and see if I have another behavior.

ok, the idea of a network issue was a good idea. I used wireshark to capture the traffic network and here is the result :slight_smile:
with the VM which works ( asterisk 13 LTS from apt on debian 9 ):

Wireshark first capture

with the VM which doesnt work ( FreePBX + Asterisk 16 LTS compiled on debian 9) :

wireshark second capture

(sorry i cannot put links, I am a new user, i cannot give the information in another way than a link )

And this is clear : in the first case which works, we can see RTP dialog between client and server, in the second case, for any reason I don’t understand, the system try to connect to an external IP address : 92.160.216.167 which is an unknown external IP address ( not my own address ).

Why the system try to route the packet outside ? Why this address ?

I think I’m in the good way to resolve my issue :slight_smile:

@filsif Please take a look at the NAT Configuration guide I posted earlier. You need to define your public and internal networks.

Fixed.

I will check that tomorrow , thanks for the help :slight_smile:

Your system is doing STUN lookups for no apparent reason. In Asterisk SIP Settings, all the Media Transport Settings fields (STUN and TURN) should be blank. Restart Asterisk if you change these. Also confirm that External Address and Local Networks are properly set, and there are no NAT settings enabled in Linphone. If you still have trouble, post the actual .pcap or .pcapng file (as a .tgz).

I will check all of this tomorrow when I will go back to (home)work.

I have just done a fresh install, just add 2 extents, and just one outbound route. I did not change any other parameter. The enp3s0 interface is configured with dynamic address given by my router.

I will check with the ISO official freepbx, but I had the same behavior ( no sound ).

I already done a capture :

  • windows 10 host is 192.168.1.10 , on windows host there is linphone SIP configured with 1001 account
  • debian 9 is 192.168.1.14 , hosted by windows 10, and bridge between the 2 interfaces
  • my android smartphone is 192.168.1.13 , and linphone SIP configured with 1000 account

I have done a call from smartphone/1000 to windows linphone/1001 , the windows linphone is ringing but just after, no sound , and we can see in wireshark capture that the RTP is routed outside the network ( unknown ip address).

attached piece here :
capture_asterisk_16_freepbx.tgz (39,1 Ko)

A last thing. I unfortunatly have no other device ( homework ) to do for example a native installation of asterisk/freepbx , I have to use virtualization to do my tests.

Thanks for your help all :slight_smile:

this is crazy. This morning I restart my system, I didn’t modify any parameters, and now it works. I see with wireshark the RTP packets exchanged between the 2 SIP clients.

I tried all the parameters I modified ( with rollback) and reboot the VM, now it works.

The only difference is that my VM has its IP address changed ( expired lease ).

I have a backup of my VM before the installation and parameters. I retry with a fresh install to see what happens.

I ve tried the voicemail recording, it still don’t work ( 0 sec recording ). Another issue …

Ok, i have done a fresh install, and just after installation, i ve just added 2 extents and 1 outbound route.

I don’t change any other parameter.

The issue occured again. But the “external” IP is now my own external IP.

Then , I followed the link suggested by @mbrooks and I did 2 things :

  • I changed into chan_ip ( non pjchan_sip ) NAT from YES to NO
  • I clicked on “detect network params” , it added my subnet with mask.

I saved, applied config AND reboot the VM. Apparently, that is I didn’t do yesterday, just apply config is not good enough.

Now, I can make calls in internal. Next issue : why the voicemail is not recorded.

I ve just tested again the voicemail with my new fresh install. It works well. I don’t know which kind of issue I could have on the previous VM.

Now , I can evaluate all the functions that I need for my project.

Thanks for your help :slight_smile:

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.