Create a custom app from the left sail menu, give it a sensible name.
Enter something like this (without the lines):
-----------------
exten => s,n,Dial(Local/12345@internal,22)
exten => s,n,Goto(s-${DIALSTATUS},1)
exten => s,n,Hangup()
exten => _s-.,1,Hangup()
exten => h,1,Hangup()
--------------------
This will dial 12345 according your dialplan rules, internal, if not present, using zap. Need to play with it, just a sample. The multiple hangups are to make sure the line hangs up under all conditions.