# Using .call for outgoing

**URL:** <https://community.asterisk.org/t/using-call-for-outgoing/4887>\
**Category:** Asterisk Support\
**Created:** [March 7, 2006, 11:23pm UTC](https://community.asterisk.org/t/using-call-for-outgoing/4887 "2006-03-07T23:23:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gamercjm](https://avatars.discourse-cdn.com/v4/letter/g/ed655f/32.png) [@Gamercjm](https://community.asterisk.org/u/Gamercjm)\
**Post date:** [March 7, 2006, 11:23pm UTC](https://community.asterisk.org/t/using-call-for-outgoing/4887/1 "2006-03-07T23:23:48Z")

</div>

Im trying to have automatic outgoing calls, and i was looking at the details about how to do it from [voip-info.org/wiki-Asterisk% … dial%20out](http://www.voip-info.org/wiki-Asterisk%20auto-dial%20out)

But i cannot get it to work correctly, I want it to dialout to a cellphone or a regular house phone.  
Is my channel set correctly?  
IAX2/NuFone.net or do it need it like IAX2/user@NuFone.net ?  
Also the number to dial, do i put that in the extension or in the Channel, because for a DISA it needs to be IAX2/user@NuFone.net/PHONE# , and if the channel needs to be IAX2/user@NuFone.net/PHONE# what would i put in the extension?

---

<div class="post-metadata">

**Author:** ![Gamercjm](https://avatars.discourse-cdn.com/v4/letter/g/ed655f/32.png) [@Gamercjm](https://community.asterisk.org/u/Gamercjm)\
**Post date:** [March 9, 2006, 12:16am UTC](https://community.asterisk.org/t/using-call-for-outgoing/4887/2 "2006-03-09T00:16:25Z")

</div>

Still cant get it to work… Is there anyone who knows make the call files please help me. I just can seem to get the chanel correct with IAX2

AIM: gamercjm8  
MSN: [gamercjm@hotmail.com](mailto:gamercjm@hotmail.com)

---

<div class="post-metadata">

**Author:** ![jag5x5](https://avatars.discourse-cdn.com/v4/letter/j/d26b3c/32.png) [@jag5x5](https://community.asterisk.org/u/jag5x5)\
**Post date:** [March 9, 2006, 3:05pm UTC](https://community.asterisk.org/t/using-call-for-outgoing/4887/3 "2006-03-09T15:05:23Z")

</div>

CAn you post your IAX.conf so we can see your config?

Jag5x5

---

<div class="post-metadata">

**Author:** ![whoiswes](https://avatars.discourse-cdn.com/v4/letter/w/dec6dc/32.png) [@whoiswes](https://community.asterisk.org/u/whoiswes)\
**Post date:** [March 9, 2006, 3:21pm UTC](https://community.asterisk.org/t/using-call-for-outgoing/4887/4 "2006-03-09T15:21:15Z")

</div>

working copy of a call file i’m using right now:

Channel: SIP/555  
Context: from-inside  
Extension: 9191329xxxx  
WaitTime: 10  
Priority: 1

Channel is the local asterisk device that is the ‘initiator’ of the call…so SIP/555 is the device that would be sending the call to the outside world.

Context is the context which you want asterisk to search for the extension

Extension is the number you want to dial. Note that I have mine prepended with a 91 as that is how our system recognizes long distance numbers. 9 is the LD prefix, and our telco requires LD numbers to have a 1 in front of them.

Waittime is how long asterisk will ring the channel before giving up

Priority I don’t know about, I always make it a 1.

Dropping this file will result in a call being placed to SIP/555, and after that device answers, Asterisk will dial the external number and bridge the two, so it would be the same as SIP/555 dialing 91913290xxxx…

Hope this helps.

W

---

<div class="post-metadata">

**Author:** ![Gamercjm](https://avatars.discourse-cdn.com/v4/letter/g/ed655f/32.png) [@Gamercjm](https://community.asterisk.org/u/Gamercjm)\
**Post date:** [March 10, 2006, 12:31am UTC](https://community.asterisk.org/t/using-call-for-outgoing/4887/5 "2006-03-10T00:31:09Z")

</div>

I think i have the call file correct, but now i get errors about extention…  
Call File:

`Channel: IAX2/Gamercjm@NuFone.net/PHONE#
Callerid: 9518347815
MaxRetries: 1
RetryTime: 600
WaitTime: 300
Context: test
Extension: s
Priority: 1
`

And the errors are:

[quote]Mar 9 16:17:54 WARNING[2538] pbx\_spool.c: Unable to set utime on /var/spool/asterisk/outgoing/1.call: Operation not permitted  
Mar 9 16:17:54 VERBOSE[10939] logger.c: – Attempting call on IAX2/Gamercjm@NuFone.net/9518376142 for s@test:1 (Retry 1)  
Mar 9 16:17:54 DEBUG[2525] channel.c: Avoiding initial deadlock for ‘IAX2/NuFone.net-1’  
…9 More times…  
Mar 9 16:17:54 WARNING[2525] channel.c: Avoided initial deadlock for ‘0x992f878’, 10 retries!  
Mar 9 16:17:54 WARNING[2533] chan\_iax2.c: Call rejected by 66.225.202.72: No such context/extension  
Mar 9 16:17:54 DEBUG[2533] chan\_iax2.c: Immediately destroying 1, having received reject  
Mar 9 16:17:55 DEBUG[10939] chan\_iax2.c: We’re hanging up IAX2/NuFone.net-1 now…  
Mar 9 16:17:55 DEBUG[10939] chan\_iax2.c: Really destroying IAX2/NuFone.net-1 now…  
Mar 9 16:17:55 VERBOSE[10939] logger.c: – Hungup 'IAX2/NuFone.net-1’  
Mar 9 16:17:55 NOTICE[10939] pbx\_spool.c: Call failed to go through, reason 1  
Mar 9 16:17:55 WARNING[10939] pbx\_spool.c: Unable to set utime on /var/spool/asterisk/outgoing/1.call: Operation not permitted  
[/quote]

And it says about “No such context/extension” but i have in the extension file just to test:

```auto
[test]
exten => s,1,Answer
exten => s,2,Wait(1)
exten => s,3,DigitTimeout(5)
exten => s,4,ResponseTimeout(10)
exten => s,5,Playback(please-enter-the)
exten => s,6,Playback(number)
exten => s,7,Hangup
```

---

<div class="post-metadata">

**Author:** ![Gamercjm](https://avatars.discourse-cdn.com/v4/letter/g/ed655f/32.png) [@Gamercjm](https://community.asterisk.org/u/Gamercjm)\
**Post date:** [March 10, 2006, 12:53am UTC](https://community.asterisk.org/t/using-call-for-outgoing/4887/6 "2006-03-10T00:53:44Z")

</div>

Hahaha I just figured out why it never worked…  
For the number i want to call I have to enter 1+Phone#, I never had to before so i didnt put it in the call file. So it works now thanks for the help.
