0

We've a mobile company starting their number with 01XXXXXXXXX

My Asterisk has two dongle modems: dongle0 and dongle1.

To dial mobile number from my Asterisk box I use

exten => _01X.,1,Dial(Dongle/dongle0/${EXTEN},20)

exten => _01X.,n,Dial(Dongle/dongle1/${EXTEN},20)

so that if dongle0 is busy the call will go through dongle1.

Problem is, if the recipient is busy or rejects the call, the call is sent again with dongle1.

I want dongle1 to send the call only if dongle0 is busy.

1 Answers1

1

Please try:

exten => _01X.,1, Dial(Dongle/dongle0/${EXTEN},20)
 same => n, Verbose(2, D0 DIALSTATUS => ${DIALSTATUS})
 same => n, GotoIf($[ $['${GOSUB_RETVAL}'='BUSY'] | $['${GOSUB_RETVAL}'='NOANSWER'] ]?all_done)
 same => n, Dial(Dongle/dongle1/${EXTEN},20)
 same => n, Verbose(2, D1 DIALSTATUS => ${DIALSTATUS})
 same => n(all_done), Verbose(2, Call being completed ... HANGUPCAUSE was ${HANGUPCAUSE})
 same => n, Hangup(${HANGUPCAUSE})

Please post the CLI results of two calls here so we can debug.

MichelV69
  • 1,271
  • 6
  • 18