FreePBX | Register | Issues | Wiki | Portal | Support

Unable to make call or receive them by SIP Trunk

freepbx
asterisk
dahdi
siptrunk
Tags: #<Tag:0x00007f749865b788> #<Tag:0x00007f749865b648> #<Tag:0x00007f749865b4e0> #<Tag:0x00007f749865b2b0>

(Dj26) #1

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:3787959@10.64.0.31](mailto:sip:3787959@10.64.0.31) SIP/2.0
Via: SIP/2.0/UDP 192.168.2.3:5060;branch=z9hG4bK4fb4c907;rport
Max-Forwards: 70
From: “Digno” &lt;[sip:3780201@192.168.2.3](mailto:sip:3780201@192.168.2.3)&gt;;tag=as3f924a5d
To: &lt;[sip:3787959@10.64.0.31](mailto:sip:3787959@10.64.0.31)&gt;
Contact: &lt;sip:3780201@192.168.2.3:5060&gt;
Call-ID: 58f5038313d4fe8d2e4b15853ba5bd9a@192.168.2.3: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

&lt;— SIP read from UDP:10.64.0.31:5060 —&gt;
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: &lt;[sip:3787959@10.64.0.31](mailto:sip:3787959@10.64.0.31)&gt;
From: “Digno” &lt;[sip:3780201@192.168.2.3](mailto:sip:3780201@192.168.2.3)&gt;;tag=as3f924a5d
CSeq: 102 INVITE
Call-ID: 58f5038313d4fe8d2e4b15853ba5bd9a@192.168.2.3:5060
Content-Length: 0

&lt;-------------&gt;
— (7 headers 0 lines) —

&lt;— SIP read from UDP:10.64.0.31:5060 —&gt;
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: &lt;[sip:3787959@10.64.0.31](mailto:sip:3787959@10.64.0.31)&gt;;tag=946684840154d1392-f81a-472e-a2b1-01fa896e0e5b
From: “Digno” &lt;[sip:3780201@192.168.2.3](mailto:sip:3780201@192.168.2.3)&gt;;tag=as3f924a5d
CSeq: 102 INVITE
Call-ID: 58f5038313d4fe8d2e4b15853ba5bd9a@192.168.2.3:5060
Server: Epygi Quadro SIP User Agent/v6.1.6 (QX-E1T1)
Content-Length: 0

&lt;-------------&gt;
— (8 headers 0 lines) —
Transmitting (NAT) to 10.64.0.31:5060:
ACK [sip:3787959@10.64.0.31](mailto:sip:3787959@10.64.0.31) SIP/2.0
Via: SIP/2.0/UDP 192.168.2.3:5060;branch=z9hG4bK4fb4c907;rport
Max-Forwards: 70
From: “Digno” &lt;[sip:3780201@192.168.2.3](mailto:sip:3780201@192.168.2.3)&gt;;tag=as3f924a5d
To: &lt;[sip:3787959@10.64.0.31](mailto:sip:3787959@10.64.0.31)&gt;;tag=946684840154d1392-f81a-472e-a2b1-01fa896e0e5b
Contact: &lt;sip:3780201@192.168.2.3:5060&gt;
Call-ID: 58f5038313d4fe8d2e4b15853ba5bd9a@192.168.2.3:5060
CSeq: 102 ACK
User-Agent: FPBX-13.0.195.22(13.24.1)
Content-Length: 0

Scheduling destruction of SIP dialog ‘58f5038313d4fe8d2e4b15853ba5bd9a@192.168.2.3:5060’ in 6400 ms (Method: INVITE)
Really destroying SIP dialog ‘58f5038313d4fe8d2e4b15853ba5bd9a@192.168.2.3: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.


(Jorgeraggs) #2

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?


(Dj26) #3

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.


(Jorgeraggs) #5

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,


(system) closed #6

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