There is an example of how to call a bash script in the included SAIL utilities in custom apps.
;
; send ALL daily CDRs to site administrator
;
exten => *904*,1,PlayBack(silence/1)
exten => *904*,2,Authenticate(3333)
exten => *904*,3,system(/etc/selintra/daycall)
exten => *904*,4,GoTo(utilend,1)
The bash call is done at *904* priority 3.
Kind Regards
S