[asterisk-users] Dial() Macro option error in 1.4.15

Anthony Messina amessina at messinet.com
Thu Dec 6 15:03:35 CST 2007


On Thursday 06 December 2007 01:37:56 pm Mark Michelson wrote:
> Anthony Messina wrote:
> > On Thursday 06 December 2007 12:42:42 pm Mark Michelson wrote:
> >> Anthony Messina wrote:
> >>> After updating to 1.4.15, I have the following issue:
> >>>
> >>> When I try to use the "M" macro option in the Dial() option, I get the
> >>> following in the console:
> >>>
> >>> -- Executing Dial("Zap/1-1",
> >>> "Zap/g2/w5051234|60|M(set-userfield^local)KT") -- Called g2/w5051234
> >>> -- Zap/3-1 answered Zap/1-1
> >>> [Dec  6 12:10:58] ERROR[19496]: app_dial.c:1541 dial_exec_full: Unable
> >>> to start autoservice on calling channel
> >>> [Dec  6 12:10:58] ERROR[19496]: app_dial.c:1553 dial_exec_full: Could
> >>> not find application Macro
> >>>     -- Hungup 'Zap/3-1'
> >>>
> >>> The requested Macro does exist in extensions.conf as:
> >>> [macro-set-userfield]
> >>> ; Set CDR userfield to value defined in Dial() command
> >>> exten => s,1,Set(CDR(userfield)=${ARG1})
> >>> exten => s,n,MacroExit()
> >>>
> >>> This always worked for me with 1.4.14 and I'm not sure how to begin to
> >>> get this fixed.  Any help is appreciated.  Thanks.
> >>
> >> I think this was due to a change in the way autoservice is handled. I
> >> think that if you were to upgrade to SVN revision 90432 or later, this
> >> error will not occur.
> >>
> >> Mark Michelson
> >
> > Thank you.  The strange this is, in the first example, I was pulling the
> > extension from MySQL RealTime and got the error.
> >
> > If, however, I place a fake extension (2289) that dials the same number
> > in extensions.conf (for testing):
> >
> > exten => 2289,1,Dial(Zap/g2/w5051234|60|KM(set-userfield^local)T)
> >
> > it works as follows and the macro is executed properly:
> >
> > -- Starting simple switch on 'Zap/1-1'
> > -- Executing [2289 at mss-chicago:1] Dial("Zap/1-1", "Zap/g2/w5051234|60|
> > KM(set-userfield^local)T") in new stack
> > -- Called g2/w5051234
> > -- Zap/3-1 answered Zap/1-1
> > -- Executing [s at macro-set-userfield:1] Set("Zap/3-1",
> > "CDR(userfield)=local") in new stack
> > -- Executing [s at macro-set-userfield:2] MacroExit("Zap/3-1", "") in new
> > stack -- Hungup 'Zap/3-1'
> >
> > Is there some sneaky difference between the two methods of matching the
> > extension that might cause this?
>
> The difference most likely is that in the code path executed by retrieving
> the extension from realtime autoservice was started on the channel, and
> then when Dial() was called, autoservice was started on the channel again.
> By putting the "fake" extension in, autoservice was only started once, and
> so the error fixed in revision 90432 would not show itself.
>
> Mark Michelson

Thank you for clearing that up.  For now, I've removed the "M" option in my 
extensions stored in MySQL and the calls execute as expected.  I'll probably 
wait for the 90432 revision to make it to the next release as I'm not going 
to have the time to recompile right now.

What was I trying to do???...

Using the "M" option is probably not the best way to set the CDR(userfield) 
anyway.  What I was trying to accomplish was to have inbound DUNDi calls 
define something like "dundi-in" in the userfield, and ENUM would say "enum, 
or something like that.  The trouble is, I use a grabber script which grabs 
all the AT&T numbers "local" to my pstn and store those area codes/prefixes 
in realtime for use with DUNDi or local calls.  I know I could use a 
Set(CDR(userfield)=dundi-in) as priority 1, and have the Dial as priority 2 
in MySQL, but I have to figure out how to fix my grabber script for that.

Is there a way that an inbound DUNDi call could have an accountcode based on 
the peer which is connecting to place the call?

-- 
Anthony -  http://messinet.com - http://messinet.com/~amessina/gallery
8F89 5E72 8DF0 BCF0 10BE 9967 92DC 35DC B001 4A4E
-------------- 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/20071206/d37a127c/attachment-0001.pgp 


More information about the asterisk-users mailing list