Asterisk callfiles

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

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).

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)

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?

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

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

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)

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

Channel: <where you want to call> CallerID: <your clid> Application: Playback Data: <file to play> WaitTime: <waittime in seconds>

[quote=“ketan.jadhav”]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[/quote]

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

Well you’re right, I had to add a prefix.
It’s working now.
Thanks everone for your time and help.

Great ! Happy!

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

Cheers.

Ketan

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.

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 :smiley:

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.