You haven’t shown what is actually happening. Is the ARI application actually making the request to Asterisk? Does the endpoint you are calling exist? Is there any console output? Is the SIP request sent and if so what is the log for it (pjsip set logger on)?
You need to break down the scenario and isolate where it is different and failing.
Ok so here are the logs… It seems like the request is being made. The endpoint (which i altered intentionally for this post) is my personal number which is an external number.
It first calls the extension, I picked up, and it attempts to call my personal number. Instead it just hangs up. I am guessing I am missing a parameter?
[2018-09-06 08:58:45] VERBOSE[30142] dial.c: Called 1776
[2018-09-06 08:58:45] VERBOSE[30142] dial.c: PJSIP/1776-000184a2 is ringing
[2018-09-06 08:58:46] WARNING[53130] res_pjsip_pubsub.c: No registered subscribe handler for event presence.winfo
[2018-09-06 08:58:46] WARNING[54125] res_pjsip_pubsub.c: No registered publish handler for event presence
[2018-09-06 08:58:47] VERBOSE[30142] dial.c: PJSIP/1776-000184a2 answered
[2018-09-06 08:58:47] WARNING[30142][C-0000b835] pbx.c: Channel ‘PJSIP/1776-000184a2’ sent to invalid extension but no invalid handler: context,exten,priority=outbound-context,66880038,1
The reason is stated in the last warning message. You told it to go to extension “66880038” priority 1 of context “outbound-context” when it was answered but no extension exists for that.
But I am trying to call an external number not an extension. I know I put the callto in the extension but thats because I cant find anywhere else to put the number.
The Originate route places a call to an endpoint (the PJSIP target in your case) and then once answered sends it to a location in the dialplan or an ARI application. You are telling it to do dial your PJSIP target and then go into the dialplan at that incorrect location. The endpoint value should be what you want to dial, and then the other wherever you want it to go once answered.
Those are variables, I have no idea of their contents so can’t say whether they are correct or not. For example if “callFrom” contains a dialplan location then you can’t dial that using a PJSIP channel, you have to dial it using a Local channel.
I don’t know what a “dial-phone location” is. The given originate would call pjsip/1776 and once answered send it to extension 66880038 in the dialplan.
This is the same behavior as the AMI originate, which tons of people use. You may want to search, research, experiment, and understand further in that area to get a better grasp of it all.
Those values only have context within your system, so I have no idea if those do what you want or not. You have to determine what is correct for your usage based on how I’ve said it works.
I had to add the dial plan at the end but now we are getting:
[2018-09-07 08:16:26] WARNING[9758]: res_pjsip_outbound_authenticator_digest.c:190 digest_create_request_with_auth: Endpoint: ‘GO_SIP’: Authentication credentials not accepted by server.
According to the message, the authentication credentials were not accepted by the server. You’d need to see if you are using the correct endpoint, the correct authentication credentials, that the endpoint is configured properly, and if it works in some other way - to compare the difference.
ARI has nothing to do with SIP credentials and PJSIP does not allow specifying them in the dial string. They are configured in pjsip.conf or in a realtime database if you are using that. Examples of PJSIP configuration are on the wiki[1].