Re: [Asterisk-java-users] Auto-dial
Brought to you by:
srt
From: Hakan L. <di...@gm...> - 2008-06-28 17:29:10
|
Hi, Ok, I see! But I was under the impression that I could implement a fully dynamic dialplan in java... But you suggestion should be do the job. Thank you. Hakan 2008/6/28 Maciek Tokarski <mlo...@gm...>: > Hi, > > So here is the problem..:) > > Ok, first you have to set some extensions in dialplan, for example: > > [auto-dial-context] > > exten=> incoming,1,Answer > > exten=> incoming,2,Playback(some-prompt) > > exten=> incoming,3,Read(USER_DIGITS,beep,10) ;see > http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Read > > exten=> incoming,4,Hangup() > > > > Next you have to originate call and tell Asterisk that he should place it > on your extension incoming @ context auto-dial-context, so java code may be: > > > > OriginateAction oa=new OriginateAction(); > > oa.setChannel("SIP/*your_sip_provider*/*telephone_number);* > > oa.setContext("auto-dial-context"); > > oa.setExten("incoming"); > > oa.setPriority(1); > > oa.setTimeout(30000); > > > > Then you have to send action via manager connection and capture its result > (OriginateAction is EventGeneratingAction) > > And that should be enough to fulfill your case > > > > Cheers, Maciek > ------------------------------ > > *From:* ast...@li... [mailto: > ast...@li...] *On Behalf Of *Hakan > Lager > *Sent:* Saturday, June 28, 2008 6:57 PM > *To:* ast...@li... > *Subject:* Re: [Asterisk-java-users] Auto-dial > > > > Hi, > > > > Thank you, I was aware of the Originate Action, but my problem is that I > don't know how to connnect it > > to 'dial plan magic' or a AGI script. Do you have any example? > > > > Regrads > > Hakan > > 2008/6/28 Maciek Tokarski <mlo...@gm...>: > > Hey, > > Call files aren't good way- with call files it's hard to implement service > of failed calls. Best way is to use originate action via AMI. Look at > http://asterisk-java.org/latest/apidocs/org/asteriskjava/manager/action/OriginateAction.html. > > Conjunct originate action and some dialplan magic or Agi script and you > have recipe. > > Cheers, Maciek > > > ------------------------------ > > *From:* ast...@li... [mailto: > ast...@li...] *On Behalf Of *Hakan > Lager > *Sent:* Saturday, June 28, 2008 5:45 PM > *To:* ast...@li... > *Subject:* [Asterisk-java-users] Auto-dial > > > > Hi, > > What is the best way to automatically dial out to a certain phone number > and deliver a specified pre-recorded message, and take > care of possible DTML response, via asterisk java > > Regards > Hakan > > > > PS > Sorry for sending this question both asterisk java mailing list, but this > should be the correct one ;-) > > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > |