[SOLVED]How to Originate and have usefull error messages

Title : call files, Originate, Dial application, which one to use in order to have error message ?

I know how to perform all quoted call (Originate, and so on), but I have trouble to choose the right one.

When I use the Originate and the call doesn’t roll, I can’t have sufficient information about the reason (e.g. Message: Originate failed, for a SIP user not logged in), because I must logged all calls.
It the same problem with the call files (despise the failed extension).

It is possible to do it with the Dial application but I need to “originate” the call (perform the call without an existing channel), and more I need to perform several at the same time.

Has someone an idea ?

All works perfectly now and I used the following step :

perform an Originate (notice the phoneNumber variable) ;

Action: Originate
Channel: Local/inChannel@call
Exten: outChannel
Context: call
Priority: 1
Variable: timeout=3
Variable: phoneNumber=SIP/henri

to this extension :

[ call ]
exten   => outChannel,1,Dial(${phoneNumber}, ${timeout})
exten   => outChanneln,GOTOIF((${DIALSTATUS} != ANSWER) ?erreur)
exten   => outChannel,n(erreur),UserEvent(CALL_FAILED|Reason: ${DIALSTATUS}|DetailedCause: ${HANGUPCAUSE});
exten   => inChannel,1,Answer()
exten   => inChannel,n,WaitMusicOnHold(3600)
exten   => inChannel,n,Hangup()