Steve Davies wrote:

On 31 Oct 2005, at 08:25, yusuf wrote:

Hi all,

I currently have this configuration.

exten => _X.,1,Dial(SIP/${EXTEN:[EMAIL PROTECTED]:5060)
exten => _X.,102,Set(PRI_CAUSE=42)
exten => _X.,103,Hangup()


I have an Asterisk box connected via E1/PRI to Siemens PBX. The siemens PBX sends my Asterisk box all cell phone call, and from the Asterisk box I dial SIP to a SIM gateway. I am trying to implement a fail-over, as in where the sims are not working, etc, then I send a PRI_CAUSE back to the PBX. However, this works in some cases, i.e. when I get a 'No circuit available' - 503 Service unavailable then it goes to the 102 priority. But it does not go to the 102 priority on ' 488 Not Acceptable Here' .

So my question is how to I make it go to priority 102 whenever it fails in priority 1

Any ideas??

HI Yusuf,

The "jump to exten+101" logic is now actually deprecated in CVS-HEAD and 1.2-to-be. Nowadays we would just test the value of DIALSTATUS after the dial.

But if your requirement is simply that every time the dial fails for whatever reason you want to send back cause code 42, then the solution is very simple:


exten => _X.,1,Dial(SIP/${EXTEN:[EMAIL PROTECTED]:5060)
exten => _X.,2,Set(PRI_CAUSE=42)
exten => _X.,3,Hangup()


Asterisk only branches to the "+101" if it actually exists. So this will trap all returns from Dial.

If you want, or it proves necessary, you can also inspect DIALSTATUS to see what happened and do different things.

Here's how its commonly done:

exten => _X.,1,Dial(SIP/${EXTEN:[EMAIL PROTECTED]:5060)
exten => _X.,2,Goto(pd-${DIALSTATUS},1)
exten => pd-BUSY,1,...
exten => pd-NOANSWER,1,...
etc...




Steve


thanks steve, helps a million.


_______________________________________________
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to