deepunix's picture

Hello.

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.


__________________


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

custom dial string in IAX, SIP extensions

jonnt's picture

Any one?


Clueless

SkykingOH's picture

No idea what the OP is talking about. iax.conf and all it's includes is where you setup IAX general attributes and peers for IAX channels,

dial() command is an Asterisk dialplan command that is very well documented.

/me Scratching my head


guys, i'm talking about

deepunix's picture

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.

--- extensions.conf.old 2008-09-24 07:15:56.000000000 -0700
+++ extensions.conf 2008-09-22 05:47:17.000000000 -0700
@@ -97,7 +97,8 @@
exten => s,n,Set(CTLoop=$[1 + ${CTLoop}])
exten => s,n,Goto(s,a37)

-exten => s,n(a42),Dial(${${HuntMember}}${ds})
+exten => s,n(a42),NoOp(${EVAL(${${HuntMember}}${ds})})
+exten => s,n,Dial(${EVAL(${${HuntMember}}${ds})})
exten => s,n,Set(HuntLoop=$[1 + ${HuntLoop}])
exten => s,n,GotoIf($[$[$["foo${RingGroupMethod}" != "foofirstavailable"] & $["foo${RingGroupMethod}" != "foofirstnotonphone"]] | $["foo${DialStatus}" = "fooBUSY"]]?a46)
exten => s,n,Set(HuntMembers=0)


deepunix, I think what he is

fskrotzki's picture

deepunix,

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.


It makes the FOP panel not

jonnt's picture

It makes the FOP panel not work for those extension. In my case it really does not matter because these are iax modems.