[asterisk-users] Asterisk uses "Anonymous", but why?

Murthy Gandikota murthy64 at hotmail.com
Thu Aug 6 12:33:37 CDT 2015



________________________________
> Date: Thu, 6 Aug 2015 12:07:35 -0500 
> From: rmudgett at digium.com 
> To: asterisk-users at lists.digium.com 
> Subject: Re: [asterisk-users] Asterisk uses "Anonymous", but why? 
> 
> 
> 
> On Thu, Aug 6, 2015 at 11:56 AM, Murthy Gandikota 
> <murthy64 at hotmail.com<mailto:murthy64 at hotmail.com>> wrote: 
> Tested with X-Lite and it worked fiine. Is there some way to replace 
> "Anonymous" with a config parameter? 
> 
> Thanks for your kind help 
> 
> ---------------------------------------- 
>> From: murthy64 at hotmail.com<mailto:murthy64 at hotmail.com> 
>> To: asterisk-users at lists.digium.com<mailto:asterisk-users at lists.digium.com> 
>> Subject: Asterisk uses "Anonymous", but why? 
>> Date: Wed, 5 Aug 2015 21:38:16 +0000 
>> 
>> Hi All 
>> 
>> I am trying to dial out using SIP and Vonage using the instructions : 
>> 
>> <a href="http://www.voip-info.org/wiki/view/Asterisk+and+Vonage" 
> target="_blank" 
> class="newlyinsertedlink">http://www.voip-info.org/wiki/view/Asterisk+and+Vonage</a> 
>> 
>> It was not working. So I downloaded X-PRO Vonage, the vonage sip 
> phone, and wiresharked the port. I see that a significant difference is 
> the vonage phone uses "Vonage User" where 
>> asterisk uses "Anonymous". Is that the problem? The Inbound call 
> works fine. Here is my sip.conf 
>> 
>> [general] 
>> context = demo ; Default context for incoming calls 
>> bindport = 5060 ; UDP Port to bind to (SIP standard port is 5060) 
>> bindaddr = 0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all) 
>> srvlookup = yes ; Enable DNS SRV lookups on outbound calls 
>> context=incoming 
>> disallow=all 
>> allow=ulaw 
>> allow=alaw 
>> allow=g729 
>> allow=g723 
>> externip=72.220.28.226 
>> localnet=192.168.0.0 
>> nat=yes 
>> maxexpiry=15 
>> minexpiry=14 
>> ;rtautoclear=no 
>> ;autofallthrough=yes 
>> 
>> register 
> =><did>:<password>@69.59.234.67:5060/202<http://69.59.234.67:5060/202> 
>> 
>> [vonage-out] 
>> username=<did> 
>> type=friend 
>> secret=<password> 
>> port=5061 
>> nat=yes 
>> host=69.59.234.67 
>> fromuser=<did> 
>> fromdomain=69.59.234.67 
>> dtmfmode=rfc2833 
>> auth=md5 
>> context=from-pstn 
>> canreinvite=no 
>> 
>> Here is the CLI command used: 
>> 
>> ubuntu*CLI> originate SIP/732-xxx-xxxx at 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 => {
                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()
}
               

 		 	   		  


More information about the asterisk-users mailing list