<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 6, 2015 at 12:33 PM, Murthy Gandikota <span dir="ltr"><<a href="mailto:murthy64@hotmail.com" target="_blank">murthy64@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
________________________________<br>
> Date: Thu, 6 Aug 2015 12:07:35 -0500<br>
> From: <a href="mailto:rmudgett@digium.com">rmudgett@digium.com</a><br>
> To: <a href="mailto:asterisk-users@lists.digium.com">asterisk-users@lists.digium.com</a><br>
> Subject: Re: [asterisk-users] Asterisk uses "Anonymous", but why?<br></blockquote><div><br></div><div><snip><br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
>> Here is the CLI command used:<br>
>><br>
>> ubuntu*CLI> originate SIP/732-xxx-xxxx@vonage-out application dial<br>
>> == Using SIP RTP CoS mark 5<br>
>> [Aug 5 14:16:49] WARNING[32891][C-00000006]: chan_sip.c:23160<br>
> handle_response_invite: Received response: "Forbidden" from<br>
> '"Anonymous"<br>
</span>> <sip:<did>@<a href="http://69.59.234.67" rel="noreferrer" target="_blank">69.59.234.67</a><<a href="http://69.59.234.67" rel="noreferrer" target="_blank">http://69.59.234.67</a>>>;tag=as69898393'<br>
<span class="">>> ubuntu*CLI><br>
><br>
> Use the AMI Originate action or a call file. You can specify a caller<br>
> id there. You cannot specify one from the command line.<br>
><br>
> Richard<br>
<br>
<br>
</span>Hi Richard<br>
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?<br>
<br>
Here is my Asterisk-Java code:<br>
<br>
managerConnection.addEventListener(this);<br>
originateAction = new OriginateAction();<br>
originateAction.setChannel("SIP/"+ani);<br>
originateAction.setContext("from-pstn");<br>
originateAction.setExten(????);<br>
originateAction.setPriority(new Integer(1));<br>
originateAction.setCallerId("murthy");<br>
originateAction.setTimeout(new Integer(30000));<br>
<br>
// connect to Asterisk and log in<br>
managerConnection.login();<br>
<br>
// send the originate action and wait for a maximum of 30 seconds for Asterisk<br>
// to send a reply<br>
originateResponse = managerConnection.sendAction(originateAction, 30000);<br>
<br>
I get error with this.<br>
<br>
<br>
Here is from-pstn context in extensions.ael<br>
<br>
context from-pstn {<br>
1619xxxxxxx => {<br></blockquote><div><br></div><div>This looks like a dialplan pattern match exten but you do not have a leading '_' to indicate<br>that it is a pattern so this exten will only match a literal "1619xxxxxxx".</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Answer();<br>
Playback(welcomesystole);<br>
Read(digito1,,3);<br>
Playback(diastole);<br>
Read(digito2,,3);<br>
Agi(agi://<a href="http://10.10.22.171:4573/hello.agi?systole=${digito1}&diastole=${digito2}" rel="noreferrer" target="_blank">10.10.22.171:4573/hello.agi?systole=${digito1}&diastole=${digito2}</a>);<br>
Hangup()<br>
<div class="HOEnZb"><div class="h5">}<br>
</div></div></blockquote><div><br></div><div>It is up to you where you want to send the originated call to in your dialplan. Since you<br></div><div>appear to want to send it to an extension that is a pattern you need to use a value that<br></div><div>the pattern will match such as 16190000000.<br></div><div><br></div><div>Richard<br></div></div><br></div></div>