Danila Abramenko
Danila Abramenko

Reputation: 1

Playback file in Call Waiting on Asterisk

Please help in the problem that I encountered recently.

When implementing the function of informing the caller "User talking on the first line Please wait or call back later." With the function "Call Waiting" in the Asterisk I use this macro:

extensions_custom.conf

[from-internal-custom]
exten => _XXX,1,Macro(check-number,${EXTEN})
include => macro-check-number

[macro-check-number]
exten => s,1,NoOp(Enter in macro-check-number)
exten => s,n,Set(devst=${DEVICE_STATE(SIP/${ARG1})})
exten => s,n,ExecIf($["${devst}" = "INUSE"]?Playback(ml))
exten => s,n,NoOp(Exit from macro-check-number)

ml - filename for playback

And this feature works!

But the macro works for the entire Asterisk, this queue calls, group calls - and that is the problem.

I have an idea - a group of calls and queue calls to assign numbers four-digit extensions, for example: 2222 - but are not you should not be, it is a false solution to the problem, because of which in the future could be a problem!

Maybe somebody faced a similar problem?

Upvotes: 0

Views: 1720

Answers (3)

3XTON
3XTON

Reputation: 41

You don't need to include section in the from-internal-custom context as extensions_custom.conf file is included in the dial plan.

You need to change the pattern of extension:

[from-internal-custom]
exten => _99XXX,1,Macro(check-number,${EXTEN:2})

[macro-check-number]
exten => s,1,NoOp(Enter in macro-check-number)
exten => s,n,Set(devst=${DEVICE_STATE(SIP/${ARG1})})
exten => s,n,ExecIf($["${devst}" = "INUSE"]?Playback(ml))
exten => s,n,NoOp(Exit from macro-check-number)


Upvotes: 1

Danila Abramenko
Danila Abramenko

Reputation: 1

The problem was solved in the circuit. Since we serve telephony server with no more than 250 members - it was decided to create a four-digit number for the groups and queues.

Upvotes: 0

arheops
arheops

Reputation: 15259

You have analyze environment of call based on your dialplan.

For examples of such dialplan you can see recoring macro in freepbx project. However simplest way is just use different context for ringgroup/queues and direct diallling.

Upvotes: 0

Related Questions