I have a PJSIP trunk assigned to my PBX all working ok but i have a second number associated with it that rings the same as the head number does despite the fact that i have created an Inbound route with its correct DID pointing to another destination.
head number: 2xxxx2xxx2
2nd number: 2xxxx2xxx5
Can you please help me or point me in the right direction on what to do?
In someone elses pabx, different vendor than freepbx he solved his issue by enabling passthrough pai header and point did mode to header. After that his inbound route would work.
How is the provider signalling the DID used to you? The default is to look for this in the request URI, but, if you are registering, you will tell the provider the value to use for that. I think we need both the contents of the INVITE and your registration related settings.
PAI is used for a caller ID on incoming numbers, not for called ID.
Try changing Context of your trunk to from-pstn-toheader
Call into both numbers and see what shows up in the DID field of the CDRs. If they are different, you can set up your Inbound Routes accordingly.
If the above doesn’t work, at the Asterisk command prompt, type pjsip set logger on
call in and look at the incoming INVITE. If the called number appears in some header, you can write a bit of dialplan similar to from-pstn-toheader to extract the number from the correct header.