Trunk configuration whit EOLO

Hello,
I’m a complete noob about PBX systems. I’m really passionate about selfhosting and I really loved the idea of having a telephone system inside and outside my home. I have configured 5 extensions whit softphone apps on my family smartphone and they are working like a charm. Snom 300 are on the way and finally my ISP EOLO sent me the VOIP configuration. Yesterday I was trying to configure a trunk but some problem where encountered. First I tried setting up the SIP configuration on my softphone and it kinda work: only calling from my softphone to the external world works, if I receive a call the number is non valid. So I tried to configure the trunk setting on freePBX 16 (latest ISO) and I encountered some problem. First the connection can’t be made, then I changed the DNS and the connection to the provider is ok, but then I have an error about outbound connection not working. If I try to call the number from the outside it doesn’t work. If I try to make a call to the outside the system says all the lines are occupied.
If logs are necessary I will attach a file or log on pastebin.
Does some of you configured an Eolo trunk and know how to make it work?
Thank you!

I know nothing about EOLO, but found

which claims a working solution.

If it works for you, we can help convert to pjsip, which you will want for the long term.

If not, it’s probably a good start; if you can’t troubleshoot on your own, at the Asterisk command prompt, type
sip set debug on
make a failing call, paste the Asterisk log for the call at pastebin.com and post the link here.

Yes I saw that forum yesterday but I don’t know where to put the parameter in the gui of freePBX, when I go to configure a new pjsip trunk I have only the gui and don’t know where to put this options. If you can help me translate to the gui it will be very helpfull. Then I will call Eolo to know why I can’t receive call but I can make it, maybe incoming call are blocked.

The parameter I have is my number +39 077XXXXXXX3, my user EVAXXXXXX2, my password and the SIP address is voce.eolo.it. I already configured the DNS of my server to point to the one of Eolo and the external IP is configured correctly in asterix.

Also I don’t know where to start to configure the routes, any help will be very appreciated!

To start, create a pjsip trunk with
Username: EVAXXXXXX2
Secret: (your password)
SIP Server: voce.eolo.it
and on the Advanced tab
From User: EVAXXXXXX2

Enable only alaw and ulaw codecs.
Set an Outbound Route with
match pattern: X.
routing to the EOLO trunk and an Inbound Route with DID Number and CallerID Number both left at ANY, routing to a working extension.

At the Asterisk command prompt, type
pjsip set logger on
If the trunk is not registered, paste the log for a registration attempt.
Otherwise, paste logs for failing outgoing and/or incoming calls.

Thank you,
so this is the failing outbound registration attempt

es_pjsip_outbound_registration.c: No response received from 'sip:voce.eolo.it:5060' on registration attempt to 'sip:[email protected]:5060', retrying in '60'
and I don’t have an inbound connection neither.

But if I put on the trunk configuration the outbound proxy to sip:10.40.99.13 it connects whit this message:

res_pjsip/pjsip_configuration.c: Endpoint eolo_039077XXXXXXX3 is now Reachable res_pjsip/pjsip_options.c: Contact eolo_039077XXXXXXX3/sip:[email protected]:5060 is now Reachable. RTT: 23.239 msec|

and the outbound configuration error:

res_pjsip_outbound_registration.c: '404' fatal response received from 'sip:voce.eolo.it:5060' on registration attempt to 'sip:[email protected]:5060', retrying in '30' seconds

in both the failed outbound error I have no free routes (this is the voice telling) and also in the logs it’s the same.
NoOp("PJSIP/201-000000ab", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 21") in new stack

When I try to call the number from another phone I have no response on the logs and the Eolo voice says “number is not reachable”

If I find the time I will post a log whit all the numbers and username removed

Try
sip:10.40.99.13\;lr\;hide
Note backslash semicolon in two places.
If you still can’t register, turn on pjsip logger and paste the Asterisk log for a registration attempt, including the replies.

It register! Thank you!
Now I can make calls!
I can’t receive call from external numbers, same voice as before. I will call Eolo to know if it’s a problem from them.

On an incoming call attempt, what appears in the Asterisk log?

If nothing, run sngrep and report what appears there.

If also nothing, post details about modem, router/firewalls, virtualization, etc.

In the asterisk log nothing appears. On sngrep also I don’t see anything, only a message from my sip client and the trunk connection I think.
freePBX/asterisk are running on a VM whit an ip on my internal lan. The lan address is 10.1.1.0/24 and the ip of the VM is 10.1.1.108. I have the firewall activated on my router (Asus). I didn’t open any port on the router for voip.

Please show the 200 OK response to the OPTIONS, either with sngrep or pjsip logger.

Here it is

edit:
I called Eolo and the operator told me that if I don’t use the router they provide whit a wired phone connected to the rj11 they don’t offer any help

There is a SIP ALG in the path causing trouble. If there is such a setting in the Asus, try turning it off.

Does the Asus have the 77.x.x.x on its WAN interface?

It was enabled, I disabled it and on the log (and on sngrep) but I can’t see any incoming call.
Yes, the router has the right ip.

I tried to reboot the vm and the router but nothing

Edit: I want to see the traffic to my router, I will report back if something is reaching the wan ip

Using pjsip logger or sngrep, look at the Contact header of a REGISTER request. It should show your public IP and the port pjsip is listening on (default 5060).

Then look at the received= and rport= tags in the Via header of the response.

If they don’t match, something is messing with the traffic.

If they do match but the incoming INVITE is not received, the NAT association is being lost, possibly a timeout (strange with OPTIONS sent and received every minute).

Yes, capturing traffic on the WAN side is a good way to troubleshoot. If you want to take a potshot, try changing Port to Listen On to something random, e.g. 27135 (requires Asterisk restart), and forward that UDP port in the router to the PBX LAN address.

So I took some screenshot of the sngrep command and it seems like it tries two connection attempt. See attached screenshot. N3 is the 401 error

N3 401 error

This all looks perfectly fine. The 401 is not an error, but a challenge that causes the PBX to resend the request with an Authorization header.

To test whether this is a timeout issue, make an outgoing call, wait for it to start ringing (it need not be answered), hang up then call in within 15 seconds. Look for an incoming INVITE.

If none, check the router WAN interface.

Tried, I see an INVITE when I dial in to call an outside number. If I try right afterI hang up I don’t see any invite and it doesn’t work.

How can I check all the packets coming in from the wan interface? Wireshark only works in local network. The gui on the asus router doesn’t allow to see the incoming packets and installing an alternative firmware only for this purpose it’s not on my plan.

I will try to connect the original router of the isp to see if it works, or I disable the firewall on the asus to see if it’s a firewall problem

I suggest you first try changing from port 5060 to something nonstandard and forwarding the port.

Also try setting Contact User to your username or your phone number.

Tried whit changing contact user, no improvement. Now I’m waiting for Eolo to see if there is a problem on their end.