<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18702"><LINK rel=stylesheet
href="BLOCKQUOTE{margin-Top: 0px; margin-Bottom: 0px; margin-Left: 2em}"></HEAD>
<BODY style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt">
<DIV><FONT size=2 face=Verdana>Hi folks,</FONT></DIV>
<DIV style="TEXT-INDENT: 2em">I'm really newbee to touch outband event. I write
socket below</DIV>
<DIV style="TEXT-INDENT: 2em">
<DIV> </DIV>
<DIV> <extension name="nb_conferences"></DIV>
<DIV> <condition field="destination_number" expression="^(30\d{2})$"></DIV>
<DIV> <action application="socket" data="127.0.0.1:8023 full"/></DIV>
<DIV> <action application="answer"/></DIV>
<DIV> <action application="conference" data="$1-${domain_name}@default"/></DIV>
<DIV> </condition></DIV>
<DIV> </extension></DIV>
<DIV> </DIV>
<DIV>and I write java server code like below:</DIV>
<DIV> </DIV>
<DIV>
<DIV>import java.io.BufferedReader;</DIV>
<DIV>import java.io.BufferedWriter;</DIV>
<DIV>import java.io.IOException;</DIV>
<DIV>import java.io.InputStreamReader;</DIV>
<DIV>import java.io.OutputStreamWriter;</DIV>
<DIV>import java.io.PrintWriter;</DIV>
<DIV>import java.net.ServerSocket;</DIV>
<DIV>import java.net.Socket;</DIV>
<DIV>import java.util.regex.*;</DIV>
<DIV></DIV>
<DIV>public class ServerCode {</DIV>
<DIV></DIV>
<DIV> /**</DIV>
<DIV> * @param args</DIV>
<DIV> */</DIV>
<DIV></DIV>
<DIV> public static int portNo = 8023;</DIV>
<DIV></DIV>
<DIV> public static void main(String[] args) throws IOException</DIV>
<DIV> {</DIV>
<DIV> // TODO code application logic here</DIV>
<DIV> ServerSocket s= new ServerSocket(portNo);</DIV>
<DIV> System.out.println("The Server is start:" + s);</DIV>
<DIV></DIV>
<DIV> Socket socket=s.accept();</DIV>
<DIV> try{</DIV>
<DIV> System.out.println("Accept the Client:"+ socket);</DIV>
<DIV></DIV>
<DIV> BufferedReader in =new BufferedReader(new InputStreamReader(socket.getInputStream()));</DIV>
<DIV> PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())),true);</DIV>
<DIV> while(true){</DIV>
<DIV> String str = in.readLine();</DIV>
<DIV> if(str.equals("byebye")){</DIV>
<DIV> break;</DIV>
<DIV> }</DIV>
<DIV> </DIV>
<DIV> System.out.println("In Server recieved the info:" + str);</DIV>
<DIV> out.println("connect\n\n"); </DIV>
<DIV> }</DIV>
<DIV> }</DIV>
<DIV>
<DIV> finally</DIV>
<DIV> {</DIV>
<DIV> System.out.println("close the server socket and the io.");</DIV>
<DIV> socket.close();</DIV>
<DIV> s.close();</DIV>
<DIV> }</DIV>
<DIV></DIV>
<DIV> }</DIV>
<DIV></DIV>
<DIV>}</DIV></DIV></DIV></DIV>
<DIV><FONT size=2 face=Verdana></FONT> </DIV>
<DIV style="TEXT-INDENT: 2em">When I use extension 1001 to dial 3001, the cli
display below:</DIV>
<DIV style="TEXT-INDENT: 2em"> </DIV>
<DIV>
<DIV>2009-06-30 18:35:27 [NOTICE] switch_channel.c:567 switch_channel_set_name() New Channel sofia/internal/1001@61.55.140.138:5060 [b9c80e50-6561-11de-8972-f3830035270b]</DIV>
<DIV>2009-06-30 18:35:27 [INFO] mod_dialplan_xml.c:233 dialplan_hunt() Processing 1001->3001 in context default</DIV></DIV>
<DIV style="TEXT-INDENT: 2em"> </DIV>
<DIV style="TEXT-INDENT: 2em">I have send "connect\n\n" to
FS, but no response to outband server. Can anyone help me?</DIV>
<DIV style="TEXT-INDENT: 2em"> </DIV>
<DIV style="TEXT-INDENT: 2em"> </DIV>
<DIV align=left><FONT color=#c0c0c0 size=2 face=Verdana>2009-06-30
</FONT></DIV><FONT size=2 face=Verdana>
<HR style="WIDTH: 122px; HEIGHT: 2px" align=left SIZE=2>
<DIV><FONT color=#c0c0c0 size=2 face=Verdana><SPAN>zhaoxxqq</SPAN>
</FONT></DIV></FONT></BODY></HTML>