Unable to make call or receive them by SIP Trunk

Hi all,

I opened the topic once again because i went on vacation and it got closed :frowning: Sorry to everyone.

Thanks to everyone in advance. I seem to be having issues regarding making calls and receive calls through my sip trunk. Iโ€™m not very experienced on Freepbx so i donโ€™t know whereโ€™s the problem with my configuration. Hereยดs my sip.conf:

host=10.64.0.31
context=default
type=friend
careinvite=no
disallow=all
allow=alaw&ulaw&gsm
dtmfmode=rfc2833
qualify=yes

The peers is working, as far as i know:

raspbx CLI> sip show peers
Name/username Host Dyn Forcerport Comedia ACL Port Status Description
SOC 10.64.0.31 Yes Yes 5060 OK (3 ms)
1 sip peers [Monitored: 1 online, 0 offline Unmonitored: 0 online, 0 offline]
raspbx
CLI>

Hereโ€™s the SIP debug of a failed attemp to make a call:

SIP Debugging enabled
Audio is at 42520
Adding codec ulaw to SDP
Adding codec alaw to SDP
Adding codec gsm to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 10.64.0.31:5060:
INVITE [sip:[email protected]](mailto:sip:[email protected]) SIP/2.0
Via: SIP/2.0/UDP 192.168.2.3:5060;branch=z9hG4bK4fb4c907;rport
Max-Forwards: 70
From: โ€œDignoโ€ <[sip:[email protected]](mailto:sip:[email protected])>;tag=as3f924a5d
To: <[sip:[email protected]](mailto:sip:[email protected])>
Contact: <sip:[email protected]:5060>
Call-ID: [email protected]:5060
CSeq: 102 INVITE
User-Agent: FPBX-13.0.195.22(13.24.1)
Date: Fri, 04 Jan 2019 11:32:13 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 297

v=0
o=root 1622748209 1622748209 IN IP4 192.168.2.3
s=Asterisk PBX 13.24.1
c=IN IP4 192.168.2.3
t=0 0
m=audio 42520 RTP/AVP 0 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<โ€” SIP read from UDP:10.64.0.31:5060 โ€”>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.2.3:5060;rport=34076;received=10.64.0.16;branch=z9hG4bK4fb4c907
To: <[sip:[email protected]](mailto:sip:[email protected])>
From: โ€œDignoโ€ <[sip:[email protected]](mailto:sip:[email protected])>;tag=as3f924a5d
CSeq: 102 INVITE
Call-ID: [email protected]:5060
Content-Length: 0

<------------->
โ€” (7 headers 0 lines) โ€”

<โ€” SIP read from UDP:10.64.0.31:5060 โ€”>
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 192.168.2.3:5060;rport=34076;received=10.64.0.16;branch=z9hG4bK4fb4c907
To: <[sip:[email protected]](mailto:sip:[email protected])>;tag=946684840154d1392-f81a-472e-a2b1-01fa896e0e5b
From: โ€œDignoโ€ <[sip:[email protected]](mailto:sip:[email protected])>;tag=as3f924a5d
CSeq: 102 INVITE
Call-ID: [email protected]:5060
Server: Epygi Quadro SIP User Agent/v6.1.6 (QX-E1T1)
Content-Length: 0

<------------->
โ€” (8 headers 0 lines) โ€”
Transmitting (NAT) to 10.64.0.31:5060:
ACK [sip:[email protected]](mailto:sip:[email protected]) SIP/2.0
Via: SIP/2.0/UDP 192.168.2.3:5060;branch=z9hG4bK4fb4c907;rport
Max-Forwards: 70
From: โ€œDignoโ€ <[sip:[email protected]](mailto:sip:[email protected])>;tag=as3f924a5d
To: <[sip:[email protected]](mailto:sip:[email protected])>;tag=946684840154d1392-f81a-472e-a2b1-01fa896e0e5b
Contact: <sip:[email protected]:5060>
Call-ID: [email protected]:5060
CSeq: 102 ACK
User-Agent: FPBX-13.0.195.22(13.24.1)
Content-Length: 0

Scheduling destruction of SIP dialog โ€˜[email protected]:5060โ€™ in 6400 ms (Method: INVITE)
Really destroying SIP dialog โ€˜[email protected]:5060โ€™ Method: INVITE

And the SIP channel, when the call is active:

raspbx*CLI> sip show channels
Peer User/ANR Call ID Format Hold Last Message Expiry Peer
10.64.0.31 3787959 6f4d892f5fdfed9 (nothing) No Tx: ACK SOC
1 active SIP dialog

ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท

Iโ€™m from Panama, since itโ€™s a small country, it only has the country code (+507). Fixed numbers are 7 digits long (like 378-7959 wich is my office number) and mobile numbers are 8 digits long (all of them starts with 6, for example 66163230) so my 2 only Outbound Routes are:

NXXXXXX โ€“ for Fixed Numbers
6XXXXXXX โ€“ For Mobile Numbers

My ISP is the same that gives me the SIP Trunk, it gives me a E1 and I convert that to SIP trough an Epygi Module. Thatโ€™s where the 10.64.0.31, itโ€™s an IP i gave to the Epygi so it can work as my Sip server. As to how I connect everything.

E1 โ†’ Epygi โ†’ Router (Nat between 10.64.0.31 and the subnet the RPi is, which is 192.168.2.0/24) Teldat M1 โ†’ RPi and Softphone.

Edit: My Inbound Calls doesnโ€™t work either, the call doesnโ€™t get to the Asterisk.

Please let me know if you find the issue here.

Is your match pattern configured properly? What about firewall? Any port forwarding config? Did you open ports on ufw on Pi? Does router have SIP ALG disabled?

Good Day JorgeRaggs,

Thanks for the Reply!

Yes I have my match pattern properly configured, but that doesnโ€™t seems to be the problem, as the call itself is not seen by my Epygi SIP/E1, so i Think thereโ€™s a Routing problem between the Rpi with either the Router or the Epygi.

On My Rpi i just created the route to the subnet 10.64.0.0/16.

image

On the Router, only the default route 0.0.0.0 0.0.0.0 to the Epygi Sip server (10.64.0.31).

from ping, i can get to the 10.64.0.31 address with no problem, but when it comes to calls, it doesnโ€™t seem to work.

I havenโ€™t use ufw on the Rpi, is it enable by default? And as for Firewall, there is none on either Epygi, Router or Rpi.

Rewritten previous comment on laptop.

1a. I would verify whether softphone is even registered (options ping the softphone if possible)
1b. I would double-check that FreePBX knows my internal IP and my external IP, firewall config, if service is listening on port 5060/5061 and what is the transport set (If UDP, explicitly define this on softphone also in domain/proxy e. g. sip:192.168.100.1:5060
2. I would setup echo test and tried to make a call within the same subnet
3. I would test echo test from a different subnet

During all these tests, have a wireshark running (or download a tshark if you want to run it in shell) and check the call flow.

In your case it does not seem to be a routing issue, but firewall issue. You can also test it with telnet on port 5060.

From what you have described it seems that either softphone, PBX or firewall is misconfigured. But letโ€™s assume everything is broken and double-check all. If telnet is failing, focus on the path first and check firewall (selinux, ufw, router firewall)

Hope it helps,

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