Solved

Asterisk AMI making outbound calls

Posted on 2011-02-18
1
1,492 Views
Last Modified: 2012-06-21
Hi,

ok I want to create a way of calling outside numbers from the AMI. I can call internal numbers ok. But External do not work.

Now my extensions_custom.conf is as below:

[test]
exten => _9XXXXXXXXXXX,1,Dial(SIP/Voip Unlimited/${EXTEN:1})

Currently I'm puting in the below into the AMI:

Action: Originate
Channel: SIP/VoipUnlimited/908457203040
Context: test
CallerID: 01613584515
CallerIDName: Jason
Exten: 1001
Priority: 1

I get

Action: Originate
Channel: SIP/VoipUnlimited/908457203040
Context: test
CallerID: 01613584515
CallerIDName: Jason
Exten: 1001
Priority: 1

Response: Success
Message: Originate successfully queued

Event: Newchannel
Privilege: call,all
Channel: SIP/VoipUnlimited-0000001a
ChannelState: 0
ChannelStateDesc: Down
CallerIDNum:
CallerIDName:
AccountCode:
Exten:
Context: from-trunk
Uniqueid: 1297880290.26

Event: VarSet
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Variable: SIPCALLID
Value: 0c245fa46a5a29d213e381a87676b5e8@192.168.1.200
Uniqueid: 1297880290.26

Event: NewAccountCode
Privilege: call,all
Channel: SIP/VoipUnlimited-0000001a
Uniqueid: 1297880290.26
AccountCode:
OldAccountCode:

Event: NewCallerid
Privilege: call,all
Channel: SIP/VoipUnlimited-0000001a
CallerIDNum: 01613584515
CallerIDName:
Uniqueid: 1297880290.26
CID-CallingPres: 0 (Presentation Allowed, Not Screened)

Event: Newstate
Privilege: call,all
Channel: SIP/VoipUnlimited-0000001a
ChannelState: 6
ChannelStateDesc: Up
CallerIDNum: 01613584515
CallerIDName:
Uniqueid: 1297880290.26

Event: Newexten
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Context: default
Extension: s
Priority: 1
Application: Playback
AppData: you-seem-impatient
Uniqueid: 1297880290.26

Event: VarSet
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Variable: PLAYBACKSTATUS
Value: SUCCESS
Uniqueid: 1297880290.26

Event: Newexten
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Context: default
Extension: s
Priority: 2
Application: Macro
AppData: hangupcall
Uniqueid: 1297880290.26

Event: VarSet
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Variable: MACRO_DEPTH
Value: 1
Uniqueid: 1297880290.26

Event: VarSet
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Variable: MACRO_EXTEN
Value: s
Uniqueid: 1297880290.26

Event: VarSet
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Variable: MACRO_CONTEXT
Value: default
Uniqueid: 1297880290.26

Event: VarSet
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Variable: MACRO_PRIORITY
Value: 2
Uniqueid: 1297880290.26

Event: VarSet
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Variable: MACRO_DEPTH
Value: 1
Uniqueid: 1297880290.26

Event: Newexten
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Context: macro-hangupcall
Extension: s
Priority: 1
Application: GotoIf
AppData: 1?skiprg
Uniqueid: 1297880290.26

Event: VarSet
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Variable: MACRO_DEPTH
Value: 1
Uniqueid: 1297880290.26

Event: Newexten
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Context: macro-hangupcall
Extension: s
Priority: 4
Application: GotoIf
AppData: 1?skipblkvm
Uniqueid: 1297880290.26

Event: VarSet
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Variable: MACRO_DEPTH
Value: 1
Uniqueid: 1297880290.26

Event: Newexten
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Context: macro-hangupcall
Extension: s
Priority: 7
Application: GotoIf
AppData: 1?theend
Uniqueid: 1297880290.26

Event: VarSet
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Variable: MACRO_DEPTH
Value: 1
Uniqueid: 1297880290.26

Event: Newexten
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Context: macro-hangupcall
Extension: s
Priority: 9
Application: Hangup
AppData:
Uniqueid: 1297880290.26

Event: VarSet
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Variable: MACRO_DEPTH
Value: 0
Uniqueid: 1297880290.26

Event: Newexten
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Context: default
Extension: h
Priority: 1
Application: Macro
AppData: hangupcall,
Uniqueid: 1297880290.26

Event: VarSet
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Variable: MACRO_IN_HANGUP
Value: 1
Uniqueid: 1297880290.26

Event: VarSet
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Variable: MACRO_DEPTH
Value: 1
Uniqueid: 1297880290.26

Event: VarSet
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Variable: MACRO_EXTEN
Value: h
Uniqueid: 1297880290.26

Event: VarSet
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Variable: MACRO_CONTEXT
Value: default
Uniqueid: 1297880290.26

Event: VarSet
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Variable: MACRO_PRIORITY
Value: 1
Uniqueid: 1297880290.26

Event: VarSet
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Variable: ARG1
Value:
Uniqueid: 1297880290.26

Event: VarSet
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Variable: MACRO_DEPTH
Value: 1
Uniqueid: 1297880290.26

Event: Newexten
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Context: macro-hangupcall
Extension: s
Priority: 1
Application: GotoIf
AppData: 1?skiprg
Uniqueid: 1297880290.26

Event: VarSet
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Variable: MACRO_DEPTH
Value: 1
Uniqueid: 1297880290.26

Event: Newexten
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Context: macro-hangupcall
Extension: s
Priority: 4
Application: GotoIf
AppData: 1?skipblkvm
Uniqueid: 1297880290.26

Event: VarSet
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Variable: MACRO_DEPTH
Value: 1
Uniqueid: 1297880290.26

Event: Newexten
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Context: macro-hangupcall
Extension: s
Priority: 7
Application: GotoIf
AppData: 1?theend
Uniqueid: 1297880290.26

Event: VarSet
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Variable: MACRO_DEPTH
Value: 1
Uniqueid: 1297880290.26

Event: Newexten
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Context: macro-hangupcall
Extension: s
Priority: 9
Application: Hangup
AppData:
Uniqueid: 1297880290.26

Event: VarSet
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Variable: MACRO_DEPTH
Value: 0
Uniqueid: 1297880290.26

Event: VarSet
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Variable: RTPAUDIOQOS
Value: ssrc=1446301995;themssrc=141353769;rxjitter=0.000946;rxcount=74;txcount=76;
Uniqueid: 1297880290.26

Event: VarSet
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Variable: RTPAUDIOQOSJITTER
Value: rxjitter=0.000946;
Uniqueid: 1297880290.26

Event: VarSet
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Variable: RTPAUDIOQOSLOSS
Value: lost=0;expected=74;
Uniqueid: 1297880290.26

Event: VarSet
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Variable: RTPAUDIOQOSRTT
Value: Not available
Uniqueid: 1297880290.26

Event: VarSet
Privilege: dialplan,all
Channel: SIP/VoipUnlimited-0000001a
Variable: RTPAUDIOQOS
Value:
Uniqueid: 1297880290.26

Event: Hangup
Privilege: call,all
Channel: SIP/VoipUnlimited-0000001a
Uniqueid: 1297880290.26
CallerIDNum: 01613584515
CallerIDName: <unknown>
Cause: 16
Cause-txt: Normal Clearing

Event: RTPReceiverStat
Privilege: reporting,all
SSRC: 141353769
ReceivedPackets: 74
LostPackets: 0
Jitter: 0.0009
Transit: -0.0050
RRCount: 0

Event: RTPSenderStat
Privilege: reporting,all
SSRC: 1446301995
SentPackets: 76
LostPackets: 0
Jitter: 0
SRCount: 0
RTT: 0.000000

Open in new window

0
Comment
Question by:andybrooke
1 Comment
 
LVL 25

Accepted Solution

by:
kode99 earned 500 total points
ID: 34929393
I think you will find that if you reverse this you it will work for you.

Action: Originate
Channel: <whatever the channel is you want to dial out from>
Context: test
CallerID: 01613584515
CallerIDName: Jason
Exten: 908457203040
Priority: 1

What will happen is the channel you set will ring and when you pick it up it will dial the extension/context/priority set.  So in this case dial 908... which will place the call through the dialplan to the external 908 number.

For internal calls it sort of works both ways because it rings one party then dials through to the other party when the first one picks up.  Who was first probably does not matter so much.

By trying to originate the voip unlimited channel with the context/exten you are essentially  trying to place a call on a channel to itself.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Although VoiceOver IP has been around for a while, internet connections have only recently become fast enough to provide good call quality. Now, VoIP has become a real option for businesses looking at ways to improve their business model. In this ar…
If your business is like most, chances are you still need to maintain a fax infrastructure for your staff. It’s hard to believe that a communication technology that was thriving in the mid-80s could still be an essential part of your team’s modern I…
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now