denis at tangotel.ru Guest
|
Posted: Tue Jun 03, 2008 2:57 am Post subject: [asterisk-users] artificial |
|
|
Hello, All!
I?m trying to organize artificial queue of waiting until only one user
answers. The main problem is that user can be in free and in a busy state.
Code (AEL):
While (1) {
Dial(SIP/user1,30,tM(musicclass));
Playback(wait_for_answer);
};
All works fine when Dial returns status ?NOANSWER? (channel is in free
state). But when channel in the BUSY state, dial immediately return
control to next line, so caller continuously hear ?Please wait until
operator answers?. I need some application, which starts playing music
and returns control before music ends don?t interrupting them.
Something like that:
StartMusicOnHold(musicclass); // instead of MusicOnHold(musicclass);
While (1) {
Dial(SIP/user1,30,t);
If ( ?${DIALSTATUS}? = ?NOANSWER? ) {
Playback(wait_for_answer);
} else {
Wait(2);
};
};
But when I call Dial(), music interrupts.
In the ideal case the simple queue may be defined:
[queue1]
Member=SIP/user1
[queue2]
Member=SIP/user2
And so on?
Then call Queue(queue1) when I want to dial user1. But I have too many
users to define separately queue for each of them.
Is it possible to make something like this:
[queue]
Member=SIP/user1
Member=SIP/user2
Member=SIP/user3
Then run code:
Set(WANNA_TO_ANSWER=SIP/user1);
Queue(queue);
But I can?t found variables to affect on ACD choice.
How to solve this problem?
--
Denis V. Gudtsov
JSC Tango TELECOM
tel +7 (3412) 916-500, 916-503
icq# 158668135
denis at tangotel.ru ; www.tangotel.ru |
|