Asterisk callfiles

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

Asterisk callfiles

Postby salimafsar » Thu Apr 28, 2011 6:24 am

Hi,

I'm trying to make calls and play a message to cellphones with callfiles.
I can do this with call files but system needs to softphones.
Can ı do this without needing softphones?

Here is my conf.

Call File:
Channel: SIP/2000
MaxRetries: 1
RetryTime: 1
WaitTime: 25
Context: mycontext
Extension: 05551234567 (My cellphone number)
Priority: 1
Archive: yes

sip.conf
[2000]
type=friend
secret=123456
port=5061
host=dynamic
dtmfmode=rfc2833
dial=SIP/2000
context=mycontext
accountcode=2000
call-limit=50
disallow=all
allow=g729
allow=alaw
allow=ulaw
nat=yes
qualify=yes

extensions.conf
[mycontext]
exten => _X.,1,Set(CALLERID(all)= XXX <02124440444>)
exten => _X.,n,Dial(SIP/${EXTEN}@MyProvider,27,A(hello-world)S(7))
exten => _X.,n,Hangup()

Thanks
salimafsar
Oldsterisk
 
Posts: 78
Joined: Mon Sep 28, 2009 5:50 am

Re: Asterisk callfiles

Postby david55 » Thu Apr 28, 2011 6:32 am

SIP/2000 is bogus. Where is the message? The cellphone number should appear in Channel (possibly using a local channel, if there is something that can't be done directly).
david55
Moves Like Spencer
 
Posts: 10427
Joined: Fri Sep 26, 2008 5:03 am

Re: Asterisk callfiles

Postby ianplain » Thu Apr 28, 2011 6:35 am

Hi Change the

Channel: SIP/2000 to Channel: Local/2000

Then
exten => 2000,1,Playback(your_message)
exten => 2000,n,Noop(do something else)
exten => 2000,n,Noop(etc)
ianplain
Moves Like Spencer
 
Posts: 3076
Joined: Thu Dec 14, 2006 7:01 am
Location: Bath, UK

Re: Asterisk callfiles

Postby salimafsar » Thu Apr 28, 2011 6:36 am

The message is in Dial function, hello-world.
As I understood from your comment it should be as following;

Call File:
Channel: 05551234567 (My cellphone number)
MaxRetries: 1
RetryTime: 1
WaitTime: 25
Context: mycontext
Extension: SIP/2000
Priority: 1
Archive: yes

Is it correct?
salimafsar
Oldsterisk
 
Posts: 78
Joined: Mon Sep 28, 2009 5:50 am

Re: Asterisk callfiles

Postby salimafsar » Thu Apr 28, 2011 6:44 am

Hi Ian,

When I change it to Local/2000 as following, I got the following error.

[Apr 28 15:33:16] NOTICE[10365]: chan_local.c:510 local_call: No such extension/context 2000@default while calling Local channel
[Apr 28 15:33:16] NOTICE[10365]: channel.c:3305 __ast_request_and_dial: Unable to call channel Local/2000
[Apr 28 15:33:16] NOTICE[10365]: pbx_spool.c:356 attempt_thread: Call failed to go through, reason (0) Call Failure (not BUSY, and not NO_ANSWER, maybe Circuit busy or down?)
[Apr 28 15:33:18] NOTICE[10369]: chan_local.c:510 local_call: No such extension/context 2000@default while calling Local channel
[Apr 28 15:33:18] NOTICE[10369]: channel.c:3305 __ast_request_and_dial: Unable to call channel Local/2000
[Apr 28 15:33:18] NOTICE[10369]: pbx_spool.c:356 attempt_thread: Call failed to go through, reason (0) Call Failure (not BUSY, and not NO_ANSWER, maybe Circuit busy or down?)


Channel: Local/2000
MaxRetries: 1
RetryTime: 1
WaitTime: 25
Context: mycontext
Extension: 05551234567
Priority: 1
Archive: yes
salimafsar
Oldsterisk
 
Posts: 78
Joined: Mon Sep 28, 2009 5:50 am

Re: Asterisk callfiles

Postby ketan.jadhav » Thu Apr 28, 2011 8:15 am

Hi,

You have create call file like this :

Channel: SIP/MyProvider/05551234567
MaxRetries: 1
RetryTime: 1
WaitTime: 25
Context: mycontext
Extension: s
Priority: 1

add the follwoing in your extensions.conf

[mycontext]
exten => s,1,Playback(filename)
exten => s,n,Hangup()


Regards,

Ketan
ketan.jadhav
Oldsterisk
 
Posts: 171
Joined: Fri Feb 25, 2011 3:52 am

Re: Asterisk callfiles

Postby salimafsar » Thu Apr 28, 2011 8:23 am

Hi Ketan,

I changed regarding as your comment.
I got following error:

NOTICE[18377]: pbx_spool.c:356 attempt_thread: Call failed to go through, reason (8) Congestion (circuits busy)
salimafsar
Oldsterisk
 
Posts: 78
Joined: Mon Sep 28, 2009 5:50 am

Re: Asterisk callfiles

Postby Samael28 » Thu Apr 28, 2011 1:33 pm

Complex way.... More easy way to play files via call files:

Code: Select all
Channel: <where you want to call>
CallerID: <your clid>
Application: Playback
Data: <file to play>
WaitTime: <waittime in seconds>
Samael28
Newsterisk
 
Posts: 44
Joined: Tue Apr 26, 2011 3:25 am
Location: Kiev, Ukraine

Re: Asterisk callfiles

Postby cmendes0101 » Thu Apr 28, 2011 2:13 pm

ketan.jadhav wrote:Hi,

You have create call file like this :

Channel: SIP/MyProvider/05551234567
MaxRetries: 1
RetryTime: 1
WaitTime: 25
Context: mycontext
Extension: s
Priority: 1

add the follwoing in your extensions.conf

[mycontext]
exten => s,1,Playback(filename)
exten => s,n,Hangup()


Regards,

Ketan


This one looks correct. Are you editing the Channel part to match what your provider needs?
Since you posted this way earlier try(the way Ketan posted should work too):
Channel: SIP/2223334444@MyProvider

Assuming this is calling in US/Canada. Some providers want the full 1+ .. or just the 10 digit. How ever your able to successfully dial out on a sip phone, follow that dial pattern
cmendes0101
Newsterisk
 
Posts: 38
Joined: Wed Apr 06, 2011 4:07 pm

Re: Asterisk callfiles

Postby salimafsar » Thu Apr 28, 2011 11:57 pm

Well you're right, I had to add a prefix.
It's working now.
Thanks everone for your time and help.
salimafsar
Oldsterisk
 
Posts: 78
Joined: Mon Sep 28, 2009 5:50 am

Re: Asterisk callfiles

Postby ketan.jadhav » Fri Apr 29, 2011 12:06 am

Great ! Happy!

Enjoy the Asterisk and post your experience and more queries to help to others.

Cheers.

Ketan
ketan.jadhav
Oldsterisk
 
Posts: 171
Joined: Fri Feb 25, 2011 3:52 am

Re: Asterisk callfiles

Postby salimafsar » Fri Apr 29, 2011 12:46 am

Following is last working conf.

Channel: SIP/235105321234567@MyVOIPProvider
MaxRetries: 1
RetryTime: 1
WaitTime: 25
Context: MyContext
Extension: s
Priority: 1
CallerID:2273
Archive:yes
Account:235105321234567

[MyContext]
exten => s,1,Playback(hello-world)
;exten => s,n,Set(CDR(Src)=${telno})
exten => s,n,Hangup()

Hope works for someone else too.
salimafsar
Oldsterisk
 
Posts: 78
Joined: Mon Sep 28, 2009 5:50 am

Re: Asterisk callfiles

Postby euwas » Fri May 06, 2011 9:56 am

Hi, Im having a question about the call files.

Currently Im calling with one channel using "SIP/trunkname/number". But I want to call using multiple trunks. So I think i have to use the outbound routes. But how do I use a outbound route with the call file? "SIP/routename/number" doesn't work.

Could anybody please help me?

Thanks :D
euwas
Newsterisk
 
Posts: 1
Joined: Fri May 06, 2011 9:50 am

Re: Asterisk callfiles

Postby david55 » Fri May 06, 2011 10:00 am

Please don't piggy back other threads.

I suspect routes are an Asterisk GUI concept. You will have to use a local channel that tries each group in turn.
david55
Moves Like Spencer
 
Posts: 10427
Joined: Fri Sep 26, 2008 5:03 am


Return to Asterisk Support

Who is online

Users browsing this forum: Yahoo [Bot] and 24 guests