Solved

Asterisk AMI making outbound calls

Posted on 2011-02-18
1
1,628 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 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Asterisk - Elastix - FreePBX - Bind Port vs Extension port 3 90
CME vs Full CM 1 120
simple redial program 3 143
New VoIP phone system - what networking changes should be made 4 250
Hey there Heard about jingle, the add on for XMPP that enables point to point audio between two XMPP clients. No server config necessary. Actually quite a cool feature. However, how good is it if you can not use those voice capabilities to do a P…
Skype is a P2P (Peer to Peer) instant messaging and VOIP (Voice over IP) service – as well as a whole lot more.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

752 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