Is it possible to configure an extension to allow using SIP and IAX2 alternatively? I.e. first try IAX2 channel and if it’s not responding, immediately try SIP.
Second, that will first call IAX2/301 and then SIP/301… is that what you want? there aren’t any IP phones I know of that can maintain both an iax and sip registration at the same time…
that said though your code (with SIP instead of ISIP) will first ring IAX2/301 for 20 seconds. If 20 seconds expires before they pick up or there is an error it will try SIP/301 for 20sec.