Hello,
I’m trying to create a very simple outbound dialer.
The dialer dial numbers and play a file and hangups the call.
But there is problem with my dialplan. It won’t play the message after line is answered.
Here is my extension setting:
[dialer]
exten => _X.,1,Set(CALLERID(all)= XXX <02124440444>)
exten => _X.,n,Playback(hello)
exten => _X.,n,NoOp(IVR Test Aramasi)
exten => _X.,n,Dial(SIP/${EXTEN}@MyProvider,27)
exten => _X.,n,Answer()
exten => _X.,n,Playback(hello)
exten => _X.,n,Hangup()
and my sip.conf
[9999]
type=friend
secret=123123123
port=5061
host=dynamic
dtmfmode=rfc2833
dial=SIP/9999
context=dialer
accountcode=9999
call-limit=50
disallow=all
allow=g729
allow=alaw
allow=ulaw
nat=yes
qualify=yes
Thanks in advance
Hi
It wont work as you have it
you need to use
A(x): Play an announcement (x.gsm) to the called party.
for example.
Ian
www.cyber-cottage.co.uk
Twitter @cyberco
Hello Ian, thanks for your reply. I’m sorry but I didn’t understand well. What is A(x)?
A parameter of the Dial application, in fact the first one in the documentation!
So I think you mean that
exten => _X.,n,Playback(hello.gsm)
If so, it didn’t work too.
[code]centosCLI> core show application Dial
centosCLI>
-= Info about application ‘Dial’ =-
[Synopsis]
Place a call and connect to the current channel
[Description]
Dial(Technology/resource[&Tech2/resource2…][,timeout][,options][,URL]):
This application will place calls to one or more specified channels. As soon
as one of the requested channels answers, the originating channel will be
…
Options:
A(x) - Play an announcement to the called party, using ‘x’ as the file.[/code]
Your main misunderstanding seems to be that you think that Dial exits when the call connects. It doesn’t actually exit until the call completes.
You are totally right David.
I changed like this and it works now.
exten => _X.,n,Dial(SIP/${EXTEN}@MyProvider,27,A(hello-world))
exten => _X.,n,Hangup()
But after playing the message, how can I hangup the line?
I read Dial function and there is an S(x) parameter but maybe there is another good way.
Thanks
Why would you want to hangup the line? You have a calling party. It doesn’t make much sense for them to have to sit there and wait until you’ve dialled and announced a message, without any hope of being able to talk to the called party. If you really want to do this, there are many options on Dial. I’d look at S and G, but the overall application sounds more like one for call files.
Because sometimes customer doesn’t hangup their phone, so the line will be open.
By the way call files are not very easy and not have much functionalities.