[Asterisk-Users] System(...) but how to pass parameters?

trixter aka Bret McDanel trixter at 0xdecafbad.com
Sat Dec 24 17:40:13 MST 2005


On Sun, 2005-12-25 at 01:22 +0100, Pisac wrote:
> Not in CLI, Invoked in extensions.conf:
> exten => s,1,system(/usr/bin/logscript) ;and how to pass some parameters
> here?
> 
> if I do somenhing like:
> exten => s,1,system(/usr/bin/logscript,${CALLERID},pstn)
> then I get error.
> 

The singlke argument to system() is what you would type at the command
line (ie your shell prompt).  You get errors because you are using
commas instead of spaces.

try system(/usr/bin/logscript ${CALLERID} pstn)

-- 
Trixter http://www.0xdecafbad.com     Bret McDanel
UK +44 870 340 4605   Germany +49 801 777 555 3402
US +1 360 207 0479 or +1 516 687 5200
FreeWorldDialup: 635378
http://www.sacaug.org/ Sacramento Asterisk Users Group
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20051224/6ab4cc19/attachment.pgp


More information about the asterisk-users mailing list