Help with asterisk call file application

Hi! this its my first time in the forum.

Im using the call file application to send calls with SIP TRUNK
The call its correct but the reason when this call fail its incorrect.
I print the “REASON” Variable, but I only see this results:

0 - Failed (not busy or congested)
1 - Hung up
3 - Ring timeout
5 - Busy
8 - Congestion

My carrier told me he sent me others “REASON”, and I try to make call by dial plan. And I receive the “REASON” corrects, but not when I use it with call file application.

Im aware of some light along the way.

LOG.

When I call by dial plan:

    Executing [0443317030866@from-internal:1] Dial("SIP/2501-00009e74", "SIP/Provedor-out/0443317030866,300,Tt") in new stack
Called SIP/marcatel-out/0443317030866
Executing [0443317030866@from-internal:2] NoOp("SIP/2501-00009e74", " **Dial Status: CONGESTION and 19**") in new stack
exten => XXXXXXXXXX,Dial(SIP/marcatel-out/044${EXTEN},300,Tt)
exten => XXXXXXXXXXn,NoOp( Dial Status: ${DIALSTATUS} and ${HANGUPCAUSE})

When I call by call file application

[Nov 15 17:36:31] VERBOSE[22098] pbx.c:     -- Executing [failed@from-callcenter:11] NoOp("OutgoingSpoolFailed", "aguacate 0443317030866 El dial status es :  y el hangup casuse es: 0 causecode:  -  -    - -  -  ") in new stack
exten => failed,n,Noop(${RealNumberDialed} El dial status es : ${DIALSTATUS} y el hangup casuse es: ${HANGUPCAUSE} causecode: ${causecode} - ${CAUSECODE} -  ${PRI_CAUSE}  -${HASH(SIP_CAUSE,${CDR(dstchannel)})} - ${HASH(SIP_CAUSE,<marcatel-out>)} - ${HASH(SIP_CAUSE,marcatel-out

If you want finer control of the A leg of a call file call, you should use a Local channel to actually dial the number. I don’t know if that is compatible with your use of FreePBX.

But I can do them from the asterisk call file application?

What do you mean by “call file application”? Call files are files placed in a particular directory. They include the channel to be used to make the A leg of the call. If that is a Local/extension@context, that extension will be run and can make the actual Dial and handle resulting errors.

1 Like

I understand you.

I send the call from the file “.call” and loss the control.

Channel: SIP/my-provider/

I try send the call from dial plan! and I can control the call

Channel: Local/1808@from-call
MaxRetries: 0
RetryTime: 150
WaitTime: 15
Context: from-audio
Extension: 51
Priority: 1

David551 Tanks for all!
I can get the hangup correct!