Hi Peder,

On 5/24/19 2:15 PM, Peder Bach wrote:

> The external script is running, and return 200 OK, but genieacs then
return this error – timeout.

I believe you have done it based on examples at
https://github.com/genieacs/genieacs/wiki/Extensions and
https://github.com/genieacs/genieacs/wiki/Example-of-a-Provisioning-Flow#external-script

Your script is located under /config/ext directory and is called
trig_cpeprov. There is a function called trig_cpeprov inside this file,
right? If yes, I don't fully understand how can it return 200 OK as you
have to call provided callback with error (if any) as a first parameter
to this callback and result as a second parameter to this callback.
something like:

function myFunction(args, callback) {
    ...
    callback(null, result); // no error
    ...
    // or
    ...
    callback(error, result); // in case of error
    ...
}

exports.myFunctionExternalName = myFunction;

and then in your provision you have a call:

...
// call extension script
let result = ext("extensionScript", "myFunctionExternalName", "arg1",
... , "argN");
// handle result
...

I don't see any "200 OK" here...

Can you show us your extension script?

Best regards,

George

_______________________________________________
Users mailing list
[email protected]
http://lists.genieacs.com/mailman/listinfo/users

Reply via email to