I’m trying to update some server from chan_sip to pjsip, and I’m looking to replicate/replace some functionality in our dialplan. In the chan_sip dialplan, we would use Dial(SIP/1234@10.5.21.104) and that would dial outbound without a SIP Peer. Trying to do the same with pjsip, Dial(PJSIP/1234@10.5.21.104) give me the below logs and errors. From the pjsip troubleshooting wiki, it sound like I need to create an endpoint. Is there a way to dial without an endpoint or have a generic endpoint? Also would there be issue with an Asterisk server running chan_sip dialing an Asterisk server running pjsip?
Executing [100@testing:3] Dial(“PJSIP/6001-00000005”, “PJSIP/1234@10.5.21.104”) in new stack
[Oct 15 00:38:53] ERROR[33]: chan_pjsip.c:2645 request: Unable to create PJSIP channel - endpoint ‘10.5.21.104’ was not found
[Oct 15 00:38:53] WARNING[83][C-00000006]: app_dial.c:2578 dial_exec_full: Unable to create channel of type ‘PJSIP’ (cause 3 - No route to destination)
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [100@testing:4] Hangup(“PJSIP/6001-00000005”, “”) in new stack
To further elaborate, there is always an endpoint as it defines the configuration to use for the session and there is nothing stopping you from making an endpoint specifically for dialing URIs.
How would the pjsip.conf look for that? I’m still learning the pjsip config options, and I find that examples can be hard to come by for specific scenarios.
That works beautifully! Thanks! Do you have an example for unauthed inbound traffic? I have the below config so far, but it is still responding with a SIP 401 Unauthorized. I’ve tried playing around with the auth field on the endpoint, but haven’t had much luck.
For the example in mind, it would be an internally accessible Asterisk server. So calls would come from a CIDR range. So setting up an CIDR Identify associated with the endpoint would be the way to go?