On Thu, Aug 6, 2015 at 12:33 PM, Murthy Gandikota <[email protected]> wrote:
> > > ________________________________ > > Date: Thu, 6 Aug 2015 12:07:35 -0500 > > From: [email protected] > > To: [email protected] > > Subject: Re: [asterisk-users] Asterisk uses "Anonymous", but why? > <snip> > >> Here is the CLI command used: > >> > >> ubuntu*CLI> originate SIP/732-xxx-xxxx@vonage-out application dial > >> == Using SIP RTP CoS mark 5 > >> [Aug 5 14:16:49] WARNING[32891][C-00000006]: chan_sip.c:23160 > > handle_response_invite: Received response: "Forbidden" from > > '"Anonymous" > > <sip:<did>@69.59.234.67<http://69.59.234.67>>;tag=as69898393' > >> ubuntu*CLI> > > > > Use the AMI Originate action or a call file. You can specify a caller > > id there. You cannot specify one from the command line. > > > > Richard > > > Hi Richard > What should I use for extension? Since I am not bridging an extension with > outbound, but making an outbound call and playing a sound file, what would > be the extension? > > Here is my Asterisk-Java code: > > managerConnection.addEventListener(this); > originateAction = new OriginateAction(); > originateAction.setChannel("SIP/"+ani); > originateAction.setContext("from-pstn"); > originateAction.setExten(????); > originateAction.setPriority(new Integer(1)); > originateAction.setCallerId("murthy"); > originateAction.setTimeout(new Integer(30000)); > > // connect to Asterisk and log in > managerConnection.login(); > > // send the originate action and wait for a maximum of 30 > seconds for Asterisk > // to send a reply > originateResponse = > managerConnection.sendAction(originateAction, 30000); > > I get error with this. > > > Here is from-pstn context in extensions.ael > > context from-pstn { > 1619xxxxxxx => { > This looks like a dialplan pattern match exten but you do not have a leading '_' to indicate that it is a pattern so this exten will only match a literal "1619xxxxxxx". > Answer(); > Playback(welcomesystole); > Read(digito1,,3); > Playback(diastole); > Read(digito2,,3); > Agi(agi:// > 10.10.22.171:4573/hello.agi?systole=${digito1}&diastole=${digito2}); > Hangup() > } > It is up to you where you want to send the originated call to in your dialplan. Since you appear to want to send it to an extension that is a pattern you need to use a value that the pattern will match such as 16190000000. Richard
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
