This post is at: ForumFeatures Wanted
3 posts / 0 new
Last post
cbbs70a
cbbs70a's picture
Joined: 2008/04/10
Points: 0

I need to create a macro that will be used for outbound routes to define 5 trunks. Looking at tl-dialout-2-trunks, there is one option defined for "how long to ring" plus four identical options for each trunk. Doing the math, defining 5 trunks will require 21 total options to specify. However, when I try to create the macro and add the options, I receive a message that says "Can not add argument, maximium of 20 arguments is allowed". That's probably an arbitrary number as far as I can tell. I looked at the Asterisk source and as far as I can tell, Asterisk can handle a maximum of 80 arguments passed to a macro. So what I am asking for is the ability to add more than 20 arguments when creating a macro.
Thanks;
FSD

eeman
eeman's picture
Joined: 2007/11/06
Points: 290

ahh, that does sound like a limitation of the perl cgi more than anything. in the short term, have you considered modifying the base script so that you dont have to pass as many arg's to the base script for each trunk? Perhaps recylcing something like how long to ring, etc?

Erik Smith
dCAP
Thirdlane/Asterisk Support available
esmith.bgnv@gmail.com

cbbs70a
cbbs70a's picture
Joined: 2008/04/10
Points: 0

Thanks for the input. Yes, I thought about decreasing the the number of arguments like you said, and that would certainly solve the problem in the short term with little sacrifice to the usability of the script. But what I ended up doing was creating the macro for 5 trunks (using 21 arguments), and then manually adding the macro to user_scripts.include and user_scripts_source.include. That way, I could still see all 21 arguments displayed in the outbound routes section. The only downside is that I cant see the last argument when editing the macro in the script library, which is no big deal to me since I can edit things quicker and easier in the config files using 'vi'.
Regards;
FSD