PJSIP DIAL via IP

I’ve seen an example at the following page

https://wiki.asterisk.org/wiki/display/AST/Dialing+PJSIP+Channels

exten => _9NXXNXXXXXX,1,Dial(PJSIP/mytrunk/sip:${EXTEN:1}@203.0.113.1:5060)

I tried creating a generic trunk in pjsip.conf

[default_endpoint]
type=endpoint
transport=transport-udp-nat
context=incoming
disallow=all
allow=ulaw
direct_media=no

In extensions.conf, I have the following
exten => _333,1,NoOp(TEST via IP)
same => n,Dial(PJSIP/default_endpoint/sip:14567895465@64.136.174.35:5060)
same => n,Hangup()

It appears to call but it doesnt complete the call

My VOIP Provider have given me 3 ip address to dial to and request me to dial in a round robin fashion.
I was going to dial numbers via AMI but I cant even get it to work in the dialplan.
Am I doing something wrong?

That is a way to do it. You’ll need to provide more information about how it doesn’t work though. Console output, pjsip set logger on.

1 Like

Thanks, You’re absolutely right. Its working now! Not sure if its me or my provider had 5-8 incomplete calls in a row because I tried this with 2 different providers and it just didn’t response.