Hi!
I have an asterisk box for ~40 users and I have a couple of telephony providers using SIP. I have just migrated from Asterisk 13 to Asterisk 20.8.1.
I have the dailplan like this:
exten => _XXXXXXXXXX,1,NoOp(${CALLERID(num)})
exten => _XXXXXXXXXX,n,Dial(PJSIP/${EXTEN}@SP1,25)
exten => _XXXXXXXXXX,n,Dial(PJSIP/${EXTEN}@SP2,25)
exten => _XXXXXXXXXX,n,Hangup()
So if something is wrong with service provider 1, the call will attempt again through service provider 2. It works just fine, however I noticed the following behavior - when the call goes out and is declined by remote party (calling to myself and declining call on my cell phone) asterisk does receive the “Busy” signal from service provider but keeps executing the dialplan:
-- Executing [1111111111@vip:1] NoOp("PJSIP/621-00000291", "621") in new stack
-- Executing [1111111111@vip:2] Dial("PJSIP/621-00000291", "PJSIP/1111111111@SP1,25") in new stack
== Everyone is busy/congested at this time (1:1/0/0)
– Executing [1111111111@vip:3] Dial(“PJSIP/621-00000291”, “PJSIP/1111111111@SP2,25”) in new stack
== Everyone is busy/congested at this time (1:1/0/0)
– Executing [1111111111@vip:4] Hangup(“PJSIP/621-00000291”, “”) in new stack
If a person on remote side is actually busy and can’t talk asterisk will still keep calling even if the call was declined. I don’t remember such a behavior on Asterisk 13 (i might be mistaken though), as far as I remember call was actually ended if it was declined. So basically the question is - how can I make asterisk follow the dialplan in case something is wrong with service provider, but if there was actual user decline on remote side asterisk would just stop the call completely. Is it possible?
I’m not very experienced with asterisk yet so any help will be appreciated.
Thanks in advance.