SIP Trunks to multiple Asterisk servers

Hello,

I have 4 asterisk servers and I need to create a SIP trunk between them.
I found different configurations on the internet, and I started with the first two servers, both phones can ring but no voice.

PEER Details:
host=<<>>
type=peer
context=from-trunk
disallow=all
allow=ulaw,alaw
qualify=yes
qualifyfreq=10

Have I missed something?

One way audio or no audio at all are frequently caused by incorrect NAT settings. Are your FreePBX installations behind a NAT device? If not, it can also be caused by a codec mismatch, but IIRC codec mismatch would cause a failed call.

1 Like

Hi arielgrin,

Thanks for your reply,

I think NAT settings are not the same on both servers, and both of them are sitting behind a Pfsense box.
I’ll check the NAT first and come back.

I myself use pfSense without issues, but I read a lot of reports by other members stating that FreePBX behind pfSense is just not recommended. If both FreePBX servers are each behind a pfSense router, why don’t you establish a VPN between them, that way you avoid NAT by sending all SIP traffic down the VPN link. That is how I’ve been using it for more than 5 years and it works great.

Can you perhaps post a guide how to setup the pfSense to be “SIP Friendly”?

Not that I ever left my SIP port opened to the internet other than a couple of minutes for testing, but I managed to make it work by following this link https://doc.pfsense.org/index.php/VoIP_Configuration
In any case, for continuous use, I connect through OpenVPN. Other than correctly configuring OpenVPN server, there is no need for any special SIP related configurations. I don’t like to leave open SIP ports to the internet. Of course I understand this might not be the use case for everybody else.

1 Like

I do have a VPN between all pfsense servers.
But still no voice.

please show the CLi log and also check the codec as well.

Then there’s definitely something configured incorrectly, probably FreePBX NAT parameters.

I could try to help you figure it out, but you will have to provide more details about your setup, at least network topology and FreePBX SIP settings.

That’s great,
So Asterisk is behind the Pfsense, Pfsense is acting as Firewall, VPN, DHCP and local DNS.

SIP server 1:

Global Settings:

UDP Bindaddress: 0.0.0.0:5160
TCP SIP Bindaddress: Disabled
TLS SIP Bindaddress: Disabled
Videosupport: No
Textsupport: No
Ignore SDP sess. ver.: No
AutoCreate Peer: Off
Match Auth Username: No
Allow unknown access: Yes
Allow subscriptions: Yes
Allow overlap dialing: Yes
Allow promisc. redir: No
Enable call counters: No
SIP domain support: No
Path support : No
Realm. auth: No
Our auth realm asterisk
Use domains as realms: No
Call to non-local dom.: Yes
URI user is phone no: No
Always auth rejects: Yes
Direct RTP setup: No
User Agent: FPBX-13.0.194.2(13.12.1)
SDP Session Name: Asterisk PBX 13.12.1
SDP Owner Name: root
Reg. context: (not set)
Regexten on Qualify: No
Trust RPID: No
Send RPID: No
Legacy userfield parse: No
Send Diversion: Yes
Caller ID: Unknown
From: Domain:
Record SIP history: Off
Auth. Failure Events: Off
T.38 support: No
T.38 EC mode: Unknown
T.38 MaxDtgrm: 4294967295
SIP realtime: Disabled
Qualify Freq : 60000 ms
Q.850 Reason header: No
Store SIP_CAUSE: No

Network QoS Settings:

IP ToS SIP: CS3
IP ToS RTP audio: EF
IP ToS RTP video: AF41
IP ToS RTP text: CS0
802.1p CoS SIP: 4
802.1p CoS RTP audio: 5
802.1p CoS RTP video: 6
802.1p CoS RTP text: 5
Jitterbuffer enabled: No

Network Settings:

SIP address remapping: Enabled using externaddr
Externhost:
Externaddr: XXX.XXX.XXX.XXX:0
Externrefresh: 10
Localnet: XXX.XXX.XXX.XXX/255.255.255.0
XXX.XXX.XXX.XXX/255.255.255.0
XXX.XXX.XXX.XXX/255.255.255.0

Global Signalling Settings:

Codecs: (ulaw|alaw|gsm|g726)
Relax DTMF: No
RFC2833 Compensation: No
Symmetric RTP: No
Compact SIP headers: No
RTP Keepalive: 0 (Disabled)
RTP Timeout: 30
RTP Hold Timeout: 300
MWI NOTIFY mime type: application/simple-message-summary
DNS SRV lookup: No
Pedantic SIP support: Yes
Reg. min duration 60 secs
Reg. max duration: 3600 secs
Reg. default duration: 120 secs
Sub. min duration 60 secs
Sub. max duration: 3600 secs
Outbound reg. timeout: 20 secs
Outbound reg. attempts: 0
Outbound reg. retry 403:0
Notify ringing state: Yes
Include CID: No
Notify hold state: Yes
SIP Transfer mode: open
Max Call Bitrate: 384 kbps
Auto-Framing: No
Outb. proxy:
Session Timers: Accept
Session Refresher: uas
Session Expires: 1800 secs
Session Min-SE: 90 secs
Timer T1: 500
Timer T1 minimum: 100
Timer B: 32000
No premature media: Yes
Max forwards: 70

Default Settings:

Allowed transports: UDP
Outbound transport: UDP
Context: from-sip-external
Record on feature: automon
Record off feature: automon
Force rport: No
DTMF: rfc2833
Qualify: 0
Keepalive: 0
Use ClientCode: No
Progress inband: No
Language: en
Tone zone:
MOH Interpret: default
MOH Suggest:
Voice Mail Extension: *97


END

SIP Server 2

Global Settings:

UDP Bindaddress: 0.0.0.0:5160
TCP SIP Bindaddress: Disabled
TLS SIP Bindaddress: Disabled
Videosupport: Yes
Textsupport: No
Ignore SDP sess. ver.: No
AutoCreate Peer: Off
Match Auth Username: No
Allow unknown access: Yes
Allow subscriptions: Yes
Allow overlap dialing: Yes
Allow promisc. redir: No
Enable call counters: No
SIP domain support: No
Path support : No
Realm. auth: No
Our auth realm asterisk
Use domains as realms: No
Call to non-local dom.: Yes
URI user is phone no: No
Always auth rejects: Yes
Direct RTP setup: No
User Agent: FPBX-13.0.192.19(13.12.1)
SDP Session Name: Asterisk PBX 13.12.1
SDP Owner Name: root
Reg. context: (not set)
Regexten on Qualify: No
Trust RPID: No
Send RPID: No
Legacy userfield parse: No
Send Diversion: Yes
Caller ID: Unknown
From: Domain:
Record SIP history: Off
Auth. Failure Events: Off
T.38 support: No
T.38 EC mode: Unknown
T.38 MaxDtgrm: 4294967295
SIP realtime: Disabled
Qualify Freq : 60000 ms
Q.850 Reason header: No
Store SIP_CAUSE: No

Network QoS Settings:

IP ToS SIP: CS3
IP ToS RTP audio: EF
IP ToS RTP video: AF41
IP ToS RTP text: CS0
802.1p CoS SIP: 4
802.1p CoS RTP audio: 5
802.1p CoS RTP video: 6
802.1p CoS RTP text: 5
Jitterbuffer enabled: No

Network Settings:

SIP address remapping: Enabled using externaddr
Externhost:
Externaddr: xxx.xxx.xxx.xxx:0
Externrefresh: 10
Localnet: xxx.xxx.xxx.xxx/255.255.254.0
xxx.xxx.xxx.xxx/255.255.254.0

Global Signalling Settings:

Codecs: (ulaw|alaw|gsm|g726|h264|mpeg4|vp8|h263p|h263|h261)
Relax DTMF: No
RFC2833 Compensation: No
Symmetric RTP: No
Compact SIP headers: No
RTP Keepalive: 0 (Disabled)
RTP Timeout: 30
RTP Hold Timeout: 300
MWI NOTIFY mime type: application/simple-message-summary
DNS SRV lookup: No
Pedantic SIP support: Yes
Reg. min duration 60 secs
Reg. max duration: 3600 secs
Reg. default duration: 120 secs
Sub. min duration 60 secs
Sub. max duration: 3600 secs
Outbound reg. timeout: 20 secs
Outbound reg. attempts: 0
Outbound reg. retry 403:0
Notify ringing state: Yes
Include CID: No
Notify hold state: Yes
SIP Transfer mode: open
Max Call Bitrate: 384 kbps
Auto-Framing: No
Outb. proxy:
Session Timers: Accept
Session Refresher: uas
Session Expires: 1800 secs
Session Min-SE: 90 secs
Timer T1: 500
Timer T1 minimum: 100
Timer B: 32000
No premature media: Yes
Max forwards: 70

Default Settings:

Allowed transports: UDP
Outbound transport: UDP
Context: from-sip-external
Record on feature: automon
Record off feature: automon
Force rport: No
DTMF: rfc2833
Qualify: 0
Keepalive: 0
Use ClientCode: No
Progress inband: No
Language: en
Tone zone:
MOH Interpret: default
MOH Suggest:
Voice Mail Extension: *97

Please help I’m stuck here

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