I recently migrated our old server to new Asterisk with PJSIP, we are using database and AGI to control calls. Our customer can set up calls to either PSTN or Sip endpoints. In old sip server, we were using the following command in AGI.
SIP/#######@sipserverip.com,30,HL(299940000:7000:5000)
Now for PJSIP I have changed following for my PSTN it is working perfectly, same string but for outbound Sip calls I am getting errors. As my PSTN trunk is registered so it is working,
PJSIP/#######@sipserverip.com,30,HL(299940000:7000:5000)
It is giving me error
Unable to create PJSIP channel - endpoint 'sipserverip.com' was not found
I can fix it using pjsip.conf file and add this endpoint, but my issue is I have a huge number of endpoints in my database and there should be another solution, is it anything in configuration? as we don't add these IPS in the system but just forward calls to another sip endpoint. And the user has the option to add more endpoints too. We are not using sip registration, neither allow sipper real-time user management.
Thanks for helping out.