Assigning specific trunks to specific incoming routes

I am new to FreePBX, and moving away from 3CX. I am using FreePBX with Asterisk 18.20.2

I have six trunks(pjsip) attached to two PSTN numbers. None of the trunks send through a DID. I would like to have incoming calls on those trunks go through to ring groups I have defined. Something like the following

PSTN ## #### 2888 => t500 t501 t502  => Ring Group 611
PSTN ## #### 2777 => t503 t504 t505  => Ring Group 612

For the life of me I cannot work out how to do this. Any pointers would be really appreciated.

I have set up two ‘Incoming Routes’ but I can’t work out how to assign the trunks to the routes. I have assigned a ‘DID Number’ to each incoming route, but I am guessing that this is not being picked up because the trunks are not sending a DID; and since I have two sets of trunks, I cannot leave the DID blank either.

The trunks have a context of ‘from-pstn’ if that helps.


Do they use registration? If so the contact user can usually be set to the PSTN number.

Does any header contain the PSTN number? There is special context, something like from-pstn-toheader, for the case where it is in the To header.

The solution…

  • On each incoming trunk, under PJSIP, set the context to from-pstn-toheader
  • Did a test call and checked the logs. This showed the DID being in international format without the plus
  • Used this number for DID on the incoming number

Many thanks. You gave me an idea of what to look for

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