I’d like to have asterisk dial custom dial string, specified in peer’s config. Right now I have something like this in iax_additional.conf:
[12345]
dial=IAX2/12345
…
I’d like to set dial string to IAX2/12345/${DID}. I’ve tried to do so, but it passes ${DID} variable unmodified into Dial() function. Can somebody help me with this ? Thanks.
Also, I don’t get why “dial” config option is used and why it’s being accepted by asterisk, it isn’t documented anywhere - searched asterisk book and voip-info - no signs of dial= option.
guys, i’m talking about passing custom parameters onto dial string. I’ve accomplished this by setting “dial” parameter to IAX2/12345/${FROM_DID} AND applying this diff. It’s only for hunt groups, but the same will work for general dial.
I think what he is getting at is iax.conf, iax_additional.conf, etc are configuration files, not dialplans and as such are read into variables inside the dialplan and currently treated as such, so they don’t directly become a dialplan. Follow?
So what you have done is modified the code to read a variable in and then treat it as a small chunk of code and have it executed that way. Which for dialing you are saying works. The issue becomes one of what about any other parts of the system that is expecting it to be the old way and not this. Does it work? I don’t know, can the FOP for example handle it?
I’d post it as a feature request and include your patch as the quickest way to getting it looked and possibly implemented.