Little help with dialplan understanding

I’m trying to understand a dialplan written by someone else. Among other contexts, there’s one that I don’t quite grasp:

exten => s-BUSY/_XXX,1,GotoIf($[“${AVAILSTATUS}”<=“1”]?s-NOANSWER,1)
exten => s-BUSY/_XXX,n,Read(digit,custom/busy_tone,1)
exten => s-BUSY/_XXX,n,Hangup

What exactly does the notation “s-BUSY” and “s-NOANSWER” mean? Is it a legal notation, or is it just naming the exten similar to, for example, “123”?

I understand that “s” is used as the default entry point in a given context for incoming calls that don’t have anything in the user part of the INVITE header or the “TO” header, so they wouldn’t be processed by this context at all without the use of “s.” But what does the combination “s-BUSY” or “s-NOANSWER” signify?

Thank you for your help.

It’s an extension, just like any other. Their relevance or meaning is only within the scope of the rest of the dialplan. For example the first line checks “AVAILSTATUS” and jumps to the s-NOANSWER extension based on that.

Thank you for that quick answer!

So it is not other special exten like “s” or “t” or “i”…

Rigth… so if there is no other s-BUSY in dialplan like Goto(presmnaict,s-BUSY,1) or similar, this context is useless, right?

It is not special. If it’s not referenced it wouldn’t be used, however something like s-${DIALSTATUS} where DIALSTATUS could contain BUSY would allow it to be referenced.

1 Like

There is nothing special about s- – it has no connection to other ‘special extensions’ like s

Way back when, somebody used it in an example and everybody else ‘cribbed’ off that example.

If they had used Schwing-${DIALSTATUS} or just ${DIALSTATUS} we’d all be using that :slight_smile:

Thank you guys for explanation

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.