All pastes #22422 Raw Edit

Someone

public text v1 · immutable
#22422 ·published 2005-09-09 01:35 UTC
rendered paste body
macro std-dial(tech, dst, timeout, vmbox, presentation) {
	NoOp(rdnis=${RDNIS}, dnid=${DNID}, exten=${EXTEN}, ani=${CALLERANI});

	if (${vmbox} != "") {
		mbox=${vmbox};
	} else 
		mbox=${dst};

	if(${presentation} = 0) {
		SetCallerPres(prohib);
	} else
		SetCallerPres(allow);

	Dial(${tech}/${dst},${timeout},g);

	switch(${DIALSTATUS}) {
		case BUSY:
			Voicemail(b${mbox});
			break;

		case ANSWER:
			

		default:
			Voicemail(u${mbox});
	};

	catch a {
		VoiceMailMain(${mbox});
		return;
	};
	
	&handle-hangup();
};