Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Asterisk AMI making outbound calls

Posted on 2011-02-18
1
Medium Priority
?
1,792 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 25

Accepted Solution

by:
kode99 earned 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

I recently purchased a Bluetooth headset called the Music Jogger (model BSH10). The control buttons on it look like this: One of my goals is to use it as the microphone and speakers for Skype calls. In that respect, it works well. However, I …
As companies replace their old PBX phone systems with Unified IP Communications, many are finding out that legacy applications such as fax do not work well with VoIP. Fortunately, Cloud Faxing provides a cost-effective alternative that works over an…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

715 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