All pastes #376418 Raw Edit

creature_

public text v1 · immutable
#376418 ·published 2007-03-01 00:33 UTC
rendered paste body
context default
{
        03123123 =>
        {
        &incominghandler("SIP","creature");
        };
};

macro incominghandler(prot,device)
{
        NoOp("Incoming call from ${CALLERID(all)} to ${device} using ${prot}");

        Dial(${prot}/${device},20);
        switch(${DIALSTATUS})
        {
                case BUSY:
                Playtones(busy);
                Busy;
                break;

                case CHANUNAVAIL:
                Playtones(busy);
                Busy;
                break;

                case NOANSWER:
                Voicemail(8001,u);
                break;

                default:
                Hangup;
                break;
        };
Hangup;
return;
};