All pastes #1031929 Raw Edit

Stuff

public text v1 · immutable
#1031929 ·published 2008-05-28 10:11 UTC
rendered paste body
//
// Example AEL config file
//

macro std-exten-ael( ext , dev ) {
        Dial(${dev}/${ext},20);
        switch(${DIALSTATUS}) {
        case BUSY:
                Voicemail(b${ext});
                break;
        default:
                Voicemail(u${ext});
        };
        catch a {
                VoiceMailMain(${ext});
                return;
        };
};

context bri1 {
	83822585096 => {
		targext=${EXTEN};
		Wait(1);
		zapCD();
		Wait(1);
		Dial(Zap/r5/${targext},30,g);
	};
};

context bri2 {
	83822585098 => {
		//Answer(100);
		targext=${EXTEN};
		Wait(1);
		zapCD();
		//Hangup();
		Wait(1);
		Dial(Zap/r5/${targext},30,g);
	};
//};

//context bri3 {
	8585097 => {
		//Dial(SIP/4445551@213.210.126.41);
		SetTransferCapability(SPEECH);
		//SetCallerPres(unavailable);
		//CALLERID(num)="";
		Dial(Zap/r7/89138293067|p);
		//Dial(Zap/r14/503050)
		Hangup();
	};
	83822585097 => {
		//Dial(SIP/4445551@213.210.126.41);
		SetTransferCapability(SPEECH);
		//SetCallerPres(unavailable);
		//CALLERID(num)="";
		Dial(Zap/r7/89138293067|p);
		//Dial(Zap/r7/89227058728);
		//Dial(Zap/r14/503050)
		Hangup();
	};
};

context bri4 {
	83822585054 => {
		targext=${EXTEN};
		//targext=83822585096;
		Wait(1);
		zapCD();
		Wait(1);
		//Set(CALLERID(rdnis)) = 83822585096;
		Dial(Zap/r5/${targext},30,g);
	};
};

context ael-demo {
	s => {
		Wait(1);
		Answer();
		TIMEOUT(digit)=5;
		TIMEOUT(response)=10;
restart:
		Background(demo-congrats);
instructions:
		for (x=0; ${x} < 3; x=${x} + 1) {
			Background(demo-instruct);
			WaitExten();
		};
	};
	2 => {
		Background(demo-moreinfo);
		goto s|instructions;
	};
	3 => {
		LANGUAGE()=fr;
		goto s|restart;
	};
	500 => {
		Playback(demo-abouttotry);
		Dial(IAX2/guest@misery.digium.com);
		Playback(demo-nogo);
		goto s|instructions;
	};
	600 => {
		Playback(demo-echotest);
		Echo();
		Playback(demo-echodone);
		goto s|instructions;
	};
	_1234 => &std-exten-ael(${EXTEN}, "IAX2");
	# => {
		Playback(demo-thanks);
		Hangup();
	};
	t => jump #;
	i => Playback(invalid);
};