I couldn’t find information on the wiki or in the documentation… Does anybody know how switch statement works?
Does it directly switches (passes/redirects) the call to another asterisk server? If the both the source extension and target extension on the other support native iax transfers, then does the call go p2p after being setup?
Second command: Switch option permits a server to share his dialplan with another server (ServerA>ServerB). Note that reciprocal switch statements are not allowed (ServerA>ServerB and ServerB>ServerA).
switch => IAX2/:[]@/
Note that and need to be declared in iax.conf
of the remote server ().
then if user at extension 1541 wants to call 2645, will the call finally be delivered through server2?[/quote]
That looks about right, except you probably want ${EXTEN} rather than ${EXTEN:1}. Also, of course, you don’t want to make an IAX connection to the server that this dialplan is running on - whichever extensions are on that server wouldn’t need the Dial() entry here.
That depends on the setting(s) of notransfer= in iax.conf.