Re: [Asterisk-java-devel] B2BUA Fastagi
Brought to you by:
srt
From: ahmed m. <ama...@gm...> - 2010-01-20 11:55:15
|
i am working on asterisk 1.6,2.0 when i initiate call to (111,222) ,it is working,the issue now ,when i want to bridge the 2 calls, when i wrote BridgeAction bridge; bridge=new BridgeAction("SIP/111","SIP/222" ); Terminating reader thread:no lines available scanner closed On Wed, Jan 20, 2010 at 1:47 PM, David Fire <dd...@gm...> wrote: > you forgot your question.... > David > > 2010/1/20 ahmed magdy <ama...@gm...> > >> Asterisk 1.6.2.0 >> Java Code here >> import java.io.IOException; >> >> import org.asteriskjava.fastagi. >> AgiException; >> import org.asteriskjava.manager.AuthenticationFailedException; >> import org.asteriskjava.manager.ManagerConnection; >> import org.asteriskjava.manager.ManagerConnectionFactory; >> import org.asteriskjava.manager.TimeoutException; >> import org.asteriskjava.manager.action.OriginateAction; >> import org.asteriskjava.manager.response.ManagerResponse; >> >> >> public class b2bua { >> private ManagerConnection managerConnection; >> public b2bua() throws IOException >> { >> ManagerConnectionFactory factory = new >> ManagerConnectionFactory("192.168.50.132", "admin", "secret5"); >> this.managerConnection = factory.createManagerConnection(); >> } >> >> public void run() throws IOException, AuthenticationFailedException, >> TimeoutException >> { >> >> OriginateAction originateAction; >> ManagerResponse originateResponse; >> originateAction = new OriginateAction(); >> originateAction.setChannel("SIP/111"); >> originateAction.setContext("from-sip"); >> originateAction.setPriority(new Integer(1)); >> >> managerConnection.login(); >> originateResponse = managerConnection.sendAction(originateAction, 30000); >> >> // print out whether the originate succeeded or not >> System.out.println(originateResponse.getResponse()); >> managerConnection.logoff(); >> } >> } >> public static void main(String[] args) throws Exception { >> // TODO code application logic here >> >> >> b2bua b; >> >> b = new b2bua(); >> b.run(); >> >> >> } >> >> sip.conf >> >> [general] >> port = 5060 ; Port to bind to (SIP is 5060) >> bindaddr = 192.168.1.x ; x = Asterisk server IP address >> allow = ulaw ; Allow all codecs >> context = bogon-calls ; Send SIP callers that we don't know about here >> >> [111] >> type=friend >> username=111 >> secret=1234 >> host=dynamic >> context=from-sip >> mailbox=111 >> nat=yes >> canreinvite=no >> qualify=yes >> >> [222] >> type=friend >> username=222 >> secret=1234 >> host=dynamic >> context=from-sip >> mailbox=222 >> nat=yes >> canreinvite=no >> qualify=yes >> >> >> [1300] >> type=friend >> username=1300 >> secret=1234 >> host=dynamic >> context=from-sip >> mailbox=1300 >> nat=yes >> canreinvite=no >> qualify=yes >> >> >> [444] >> type=friend >> username=444 >> secret=1234 >> host=dynamic >> context=from-sip >> mailbox=444 >> nat=yes >> canreinvite=no >> qualify=yes >> >> I am running the program from netbeans. >> Thanks >> - Show quoted text - >> >> >> -- >> Ahmed Magdy Mahmoud >> >> >> >> ------------------------------------------------------------------------------ >> Throughout its 18-year history, RSA Conference consistently attracts the >> world's best and brightest in the field, creating opportunities for >> Conference >> attendees to learn about information security's most important issues >> through >> interactions with peers, luminaries and emerging and established >> companies. >> http://p.sf.net/sfu/rsaconf-dev2dev >> _______________________________________________ >> Asterisk-java-devel mailing list >> Ast...@li... >> https://lists.sourceforge.net/lists/listinfo/asterisk-java-devel >> >> > > > -- > (\__/) > (='.'=)This is Bunny. Copy and paste bunny into your > (")_(")signature to help him gain world domination. > > > > ------------------------------------------------------------------------------ > Throughout its 18-year history, RSA Conference consistently attracts the > world's best and brightest in the field, creating opportunities for > Conference > attendees to learn about information security's most important issues > through > interactions with peers, luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-dev2dev > _______________________________________________ > Asterisk-java-devel mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-devel > > -- Ahmed Magdy Mahmoud |