[asterisk-users] test case with queues and system()

C. Chad Wallace cwallace at lodgingcompany.com
Wed Jan 20 13:18:18 CST 2010


At 5:59 PM on 19 Jan 2010, ______________ ____________ wrote:

> Test case:
> We have e1 trunk and multi-channel sip line. Clients waiting in the
> queue, which can handle 30 clients. They listen mellody and their
> position, while waiting. The system can handle only 5 clients at the
> moment. As soon as client is the first he hears a background and then
> if he inputs any number, asterisk executes system command like wget
> example.org/?p=<input number> and call terminated.
> 
> I'm reading asteriskbook but can't connect all together right now.

I think you'll have to use the Local channel as your queue member, like
this (in queues.conf):

member => Local/s at systemcommand

And then in your dialplan (extensions.conf) you'd have something like
this:

[systemcommand]
exten => s,1,Background(press-a-key)
exten => s,n,Read(INPUT_NUMBER)||1)
exten => s,n,System(wget http://example.org/?p=${INPUT_NUMBER}) 
exten => s,n,Playback(goodbye)


Please note, these are only examples to get you started, and they
probably won't work without some tuning.

A good resource to learn more about applications is
http://voip-info.org/.  Here are a few links:

http://www.voip-info.org/wiki/view/Asterisk+-+documentation+of+application+commands
http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+System
http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Read
http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Curl

You can also use 'core show application System' and such on the Asterisk
CLI.

GLHF!


-- 

C. Chad Wallace, B.Sc.
The Lodging Company
http://www.lodgingcompany.com/
OpenPGP Public Key ID: 0x262208A0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20100120/bf15d808/attachment.pgp 


More information about the asterisk-users mailing list