I have this context to route some calls to two providers, if first fails, dial to second
[from_client]
exten =>_79X.,1,Gosub(sub_79_one,${EXTEN},1)
exten =>_79X.,n,Gosub(sub_79_two,${EXTEN},1)
[sub_79_one]
...
exten =>_7926X.,1,Dial(SIP/one/${EXTEN},,L(3600000))
...
exten =>_79X.,1,Return
[sub_79_two]
...
exten =>_7926X.,1,Dial(SIP/two/${EXTEN},,L(3600000))
...
exten =>_79X.,1,Return
but it don’t works:
[Mar 30 11:20:42] VERBOSE[5018] pbx.c: -- Executing [79261234567@client_ext:1] Gosub("SIP/client-00176d8f", "sub_79_one,79261234567,1") in new stack
[Mar 30 11:20:42] VERBOSE[5018] pbx.c: -- Executing [79261234567@sub_79_one:1] Dial("SIP/client-00176d8f", "SIP/one/79261234567,,L(3600000)") in new stack
[Mar 30 11:20:42] VERBOSE[5018] features.c: -- Setting call duration limit to 3600.000 seconds.
[Mar 30 11:20:42] VERBOSE[5018] netsock2.c: == Using SIP RTP CoS mark 5
[Mar 30 11:20:42] VERBOSE[5018] app_dial.c: -- Called SIP/one/79261234567
[Mar 30 11:20:42] VERBOSE[1336] chan_sip.c: -- Got SIP response 503 "Service Unavailable" back from 10.20.30.40:5060
[Mar 30 11:20:42] VERBOSE[5018] app_dial.c: -- SIP/one-00176d90 is circuit-busy
[Mar 30 11:20:42] VERBOSE[5018] app_dial.c: == Everyone is busy/congested at this time (1:0/1/0)
[Mar 30 11:20:42] VERBOSE[5018] pbx.c: -- Auto fallthrough, channel 'SIP/client-00176d8f' status is 'CONGESTION'
Why it don’t pass “sub_79_one” further, and don’t returns to main context???