Script to dial out to SIP client?

Is it possible to set up a script to dial out from ASL3 to a SIP client? I’m looking for a CLI comand, rather than via RF / DTMF.

Where should I be looking - is this under the autopatch section?

I’m trying to set up an automated bridge where ASL3 will dial out to a SIP client (which will auto answer). And then write a script to check if there is an active call on SIP, and if not, dial out to re-establish the link.

Is this possible?

I would do this on a private node with the autopatch directly to an extensions or context in the dialplan.

65=autopatchup,context=mysipdial,noct=1,farenddisconnect=1,dialtime=90000,quiet=0,exten=1234

That gets the event to the dialplan anyway.

Do your normal dialplan for what you want to do in extensions in the context/extension of your choosing.

answer
dial
speak
do some other stuff
hangup

As far as your script sip checking, yea, put it in the scheduler or write a tsr/service.
but I offer no guidance on that. Just the asterisk stuff.

But you could also put this in a loop in the dialplan.

1 Like

Setup autopatch to call the SIP endpoint with PJSIP.
You can check for SIP calls easily enough with an asterisk command. Try “core show help pjsip” in the asterisk CLI for details. I don’t have a node up with PJSIP loaded at the moment to tell you exactly.
You can script making the call with an asterisk command. I would just do:

asterisk -rx "rpt fun [node] *61[SIP extension]"

or whatever the right command for your autopatch setup is. Then check for the call with another asterisk command. Put it all together in a shell script.

1 Like

Thanks for your help.

I’ve got the dial out working but it hangs the node in constant TX.

This doesn’t happen on incoming SIP calls. I guess my extensions stanza is wrong.

Are there any good examples anywhere please (I couldn’t find much searching around)

73

Example here, but there isn’t much to it Autopatch - AllStarLink Manual Actually it looks like the sytax isn’t exactly right there.

1 Like

What does your extensions.conf look like?

If you did this on a private node, the tx would not matter if it were a radioless node.
Connect ‘from the private node to the node you are listening in monitor mode’ and it will not trigger it’s tx…

You also have the option of using phone-vox Pv

1 Like

Ah I missed that bit!

Excellent I will try that on the private node, thanks!