Newbie trying to get call file working

I set up Asterisk to a SPA-3000 and can call out via the PSTN line successfully from a softphone.
My dial plan is 1 xxx xxx xxxx

I am trying to use a simple call file.
Channel: SIP/PSTN/1xxxxxxxxxx #(real number replaced)
Application: Playback
Data: hello-world

There is no real call made, however the output in asterisk/log/full shows it completed in one second:

[Nov 18 16:09:30] VERBOSE[2633] logger.c: – Attempting call on SIP/PSTN/1xxxxxxxxxx for application Playback(hello-world) (Retry 1)
[Nov 18 16:09:30] VERBOSE[2633] logger.c: == Using SIP RTP TOS bits 184
[Nov 18 16:09:30] VERBOSE[2633] logger.c: == Using SIP RTP CoS mark 5
[Nov 18 16:09:30] VERBOSE[2633] logger.c: == Using SIP VRTP TOS bits 136
[Nov 18 16:09:30] VERBOSE[2633] logger.c: == Using SIP VRTP CoS mark 6
[Nov 18 16:09:30] VERBOSE[2633] logger.c: – <SIP/PSTN-00000000> Playing ‘hello-world.gsm’ (language ‘en’)
[Nov 18 16:09:31] NOTICE[2633] pbx_spool.c: Call completed to SIP/PSTN/1xxxxxxxxxxx

I have spent a long time searching, please tell me what I am missing.

Hmmm, I’m not sure what I’m missing here, but since you’re not creating a real call, there’s no real way of knowing if it will complete in under 1s or not.

If you created a new extension and ran the “echo()” function, you could test the system. You will then have a test-bed from which you can build upon.

Sorry if I’m missing the mark, but this is how I would do it.

I am trying to call my cell phone ( i replaced my real number with X’s)

The way I understand it, if an “application” is specified in a call file, no extension is needed.

Thanks

If you’re doing it this way, then I’m afraid you’re well over my head. I’ve not used automatic calling by depositing a call-file in the appropriate directory (sorry, not looked at Asterisk: TFOT in a while) so I’m sorry if I’m leading you astray.

I would first off develop a working extension with the “echo()” function or something similar and then, once you can call that and it works, develop a drop-in call-file that will call you and create the circuit you want.

Here is a little bit of code that I use to give me the current date and time:

[datetime] exten => 299,1,Answer() exten => 299,n,Wait(1) ; Wait 1 second to play all of message exten => 299,n,NoCDR() ; Do not log CDRs for dialling internal calls exten => 299,n,DateTime() ; Say Date and Time exten => 299,n,Hangup()

Which I use to establish (at least) one-way comms on the circuit to the client.

Once all that works, you can move on to more advanced functions.

Sorry to sound simplistic, but you did mention in your thread title that you were a “newbie” (we’ve all got to start somewhere so don’t feel bad!).

I develop all of my BASH scripts in the same way - start off simple and static and then add dynamic elements as you need them. At the very least you can test them as you go along.

thanks for trying to help I will continue trying more basic things and working up from there.

You’re more than welcome. I’m just sorry that I couldn’t do more for you. Hopefully someone will come along and give you the advice that you need, though.

Good luck.

So when you dial your cell phone number from your system, you dial 10 digits?
What you have for a call file should work. I’m just questioning if you have your Channel info right.

Your PSTN gateway doesn’t have answer supervision on the outgoing line.

david55, is “answer supervision” a configuration change I can make, or a limitation of my hardware (SPA-3000) that cant be overcome, maybe I could make it pause for 10-20 seconds.
Thanks for giving me a new lead.

Answer supervision is a service provided by the PSTN operator. It is often not available on domestic lines. Your analogue line interface needs to be capable of using the answer supervision mechanism used by your PSTN operator and you need to configure chan_dahdi to actually use it.

Typically, it is achieved by reversing the connection to the two wires of the phone line pair.

Without it, Asterisk has to assume an immediate answer, and you have to use dial plan applications to do things like detecting silence or non-silence.