Predial handler LUA

Hey,

I’m having some trouble to implement the predial handler function in my Asterisk 11
LUA dialplan.

In the extensions.conf it should be something like:

same => n,Dial(SIP/bar,,B(default^caller_handler^1))

But how do I do that with lua?
If I try to call the B function with:

app.dial("SIP/frank", nil, B(default^110^1))

I get this:

ERROR[100502][C-00000059]: pbx_lua.c:1437 exec: Error executing lua extension: 
[string "extensions.lua"]:6: attempt to perform arithmetic on global 'default' (a nil value)

I figured it out by myself how to implement the predial handler with lua I had to change the dial line to this:

app.dial("SIP/1234", nil, "b(default,5678,1)")

Then it jumps to the extension “5678”.

It is still kind of strange that I get the following warning in the console:

Abnormal 'Gosub(default,5678,1)' exit.  Popping routine return locations.

Does anybody knows how to fix that?