I am rather new to asterisk in general and PJSIP in particular, but after some rather extensive reading I think I got a good grasp of how things work. There is however one thing I still can’t figure out, and that is how to correctly identify inbound calls from my ITSP and assign them to the correct endpoint
My ITSP provides me with a total of 4 numbers. All four numbers are correctly registering to my ITSP’s server, each with it’s own username/password and contact address, so that inbound calls enter the dialplan with the extension that is specified for each registration. What I cannot figure out is how I could map inbound calls from my ITSP to use the correct endpoint for the corresponding number. From all I have read so far, it seems the only two methods of identifying an endpoint are IP address (which is the same for all four numbers) or the user portion of the From header (which will likely contain the sip-uri of the calling party).
In lack of a better solution, what I do right now is to assign all inbound calls from my ITSP to the first endpoint, by using an identify section with the ITSP’s IP address and have it point to the first endpoint. This setup works for now, as calls still enter the dialplan using the extension that was specified in the register, but if I wanted to specify different endpoint options for each of the four numbers then I would probably run into problems.
Is there any other method for identifying/assigning an enpoint that I’ve overlooked? Any help is appreciated.