Peer to peer sip trunk - incoming

Hello

My setup

Pfsense+ firewall with NAT and firewall rules
Dynamic public IP allocation by ISP - attached to DDNS domain by pfsense.
softphone - GSwave Lite on android and on iOS
FreePBX - 192.168.1.81
BSNL WINGS SIP service (India) - registered on freePBX
CO/PSTN Matrix Gateway -192.168.1.240
4 FXO lines - 3 occupied
4 FXS lines - all occupied - namely 30,31,32,33
default CO lines landing destination - first FXS port (ext 30)
Matrix is registered with freepbx on peer-2-peer basis

My issue -

i am able to dial out from freepbx to matrix to CO lines.
what i am unable to do it get freepbx to get incoming calls from the matrix CO lines

My peer to peer outgoing sip settings - peer details

host=192.168.1.240
type=peer
insecure=very
port=5060
qualify=yes
nat=yes
context=from-internal

what should i add in the incoming sip settings - user details and registration string???

have logged sngrep and asterisk log data … and what i can see is that matrix is transferring the call to the freepbx but freepbx is not able to process it further

log files

Line 4: 1. INVITE sip:192.168.1.81 SIP/2.0
shows that the Matrix is configured incorrectly, because there is no number that it is calling. On an incoming call, the user part of the SIP URI (and the To header) should normally be the DID number that is being called.

If for some reason you can’t set up the Matrix to do this, you could set up a context in Asterisk to accept the null call.

Please explain what is going on. Why did you set up a chan_sip trunk? In your thread Custom extensions , you said that all was working and now you are changing everything?

Please explain what is going on. Why did you set up a chan_sip trunk? In your thread Custom extensions , you said that all was working and now you are changing everything?

Hello
every thing is indeed working…
i can
-make outbound calls from freepbx via matrix
-make outbound calls from matrix
-freepbx to matrix extension and vice versa calling is working
-feature codes are working - abbriviated dialing, custom extensions

as i wrote in the thread earlier, i am trying to implement IVR on the freepbx.
So i want to forward all external calls from matrix CO lines to freepbx and then to IVR menu thru inbound route setting.

Line 4: 1. INVITE sip:192.168.1.81 SIP/2.0
shows that the Matrix is configured incorrectly, because there is no number that it is calling. On an incoming call, the user part of the SIP URI (and the To header) should normally be the DID number that is being called.

its well over my level of understanding.
Also with reference to the Custom extensions thread the matrix gateway has a lot of settings in a very complicated UI and its very hard to get around it.

if you are comfortable we can do a anydesk session if you want to see the matrix setup with live changes feedback.

Matrix SIP trunk menu screenshots

system manual matrix VFX844

more sngrep logs with different CO line

If the FXO is set up in the Matrix to route incoming calls to a Fixed Destination Number (for example use the actual number of the line), I would think that the number would be sent on the trunk in the SIP URI, and if you set the context on the FreePBX end to from-trunk, then an Inbound Route specifying that number as DID Number should route the call as you would like.

Note that I know nothing about the Matrix; I’m just reading the manual, same as you.

new log1 - chansip
new log2 - chansip

update-
if in matrix i enter fixed destination number as a extension of the freepbx (999) and select destination port as sip trunk, i can get external calls from CO lines on the specified extension. no change in settings for “context”. the CID on the extension (999) is shown as the number who called the CO line.

i also setup the matrix gateway on pjsip and its working fine.

Questions:-

  1. any way to make a custom extension that go straight to IVR menu.
  2. any way to make all incoming calls go to IVR instead of making it complicated by adding a custom extension to land on IVR menu.
  3. can i use both chansip and pjsip simultaneously on the matrix - one with context from-internal and other with from-external or from-trunk.
  • idea behind it - trunk with “from-trunk” context can route incoming calls to IVR and trunk with “from-internal” context will enable feature codes and internal calls

I need “from-internal” as i need to use freepbx feature codes on the matrix FXS ports. - please refer to this thread

Create a Misc Application that routes to your IVR. Test that by dialing it from an extension on FreePBX (not the Matrix). Once working, change the destination number on the Matrix to the code you selected, via a trunk with from-internal context.

This line will be ignored because “very” hasn’t been an acceptable value for many years (it is not in the code at all, rather than being a deprecated value that is still recognized). Fortunately it will also be ignored because for invite purposes, because there is no secret for which to challenge. I assume you never needed the port option in the first place. You should be trying to move to chan_pjsip.

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