Не удается отправить исходящий SIP-запрос



Я пытаюсь отправить исходящий sip-запрос на другой сервер, но запрос просто возвращается обратно на мой сервер. Мне нужно отправить запрос через UDP. Я использую МОБИЦЕНТЫ Sip Servlets.

Вот журналы:

2013-05-20 23: 30: 35,175 INFO [gov.nist.javax.sip.stack.SIPTransactionStack] (SelfRoutingThread-19)
от = "10.214.77.65:5060"
к = "10.214.77.65:5060"
время = "0"
isSender = "ложь"
TransactionID ="z9hg4bk1a739dca-0982-4c19-91c2-d6b30cde0e44_8017d156_6924298232771001"
CallID = "cec3692d7ee2e3771d3b2ecbd5408cf5@10.214.77.65"
firstLine = "СООБЩЕНИЕ sip:1404xxxxxxx@sms-proxy-01.bandwidthclec.com:5060 SIP/2.0"

<![CDATA[MESSAGE sip:1404xxxxxxx@sms-proxy-01.bandwidthclec.com:5060 SIP/2.0`
Call-ID: cec3692d7ee2e3771d3b2ecbd5408cf5@10.214.77.65
CSeq: 1 MESSAGE
From:`<sip:1404xxxxxxx@216.27.87.216>`;tag=32496860_8017d156_1a739dca-0982-4c19-91c2- d6b30cde0e44
To:`<sip:63917xxxxxxx@216.27.87.216>`
Max-Forwards: 70
Content-Type: text/plain
Via: SIP/2.0/UDP 23.21.213.9:5060;branch=z9hG4bK1a739dca-0982-4c19-91c2-
d6b30cde0e44_8017d156_6924298232771001
Route:
pid=1a739dca-0982-4c19-91c2-d6b30cde0e44>
Content-Length: 7

foo-bar]]>

Here's my DAR config:

ALL:("RestComm", "DAR:From", "NEUTRAL", "", "NO_ROUTE", "0")
INVITE:("org.mobicents.servlet.sip.example.CallBlockingApplication", "DAR:From", "ORIGINATING", "", "NO_ROUTE", "0")
REGISTER:("RestComm", "DAR:From", "NEUTRAL", "", "NO_ROUTE", "0")
MESSAGE:("SmsReceiver", "DAR:TO", "ORIGINATING", "", "NO_ROUTE", "0", "DIRECTION=OUTBOUND")

Here's my code (using HttpServlet) that sends the message:

    public void doGet(HttpServletRequest request, HttpServletResponse response) {
            SipFactory sf = (SipFactory) getServletContext().getAttribute(
                            "javax.servlet.sip.SipFactory");

            SipApplicationSession appSession = ((ConvergedHttpSession) request
                            .getSession()).getApplicationSession();

            logger.info("sipfactory= " + sf);
            logger.info("appSession=" + appSession);

            try {
                    SipServletRequest sipRequest = sf.createRequest(appSession, "MESSAGE","sip:1404xxxxxxx8@216.27.87.216",
                                    "sip:63917xxxxxxx@216.27.87.216");


                   //the uri where I want to send my message
                    SipURI uri = sf.createSipURI("1404xxxxxxx", "sms-proxy-01.bandwidthclec.com");
                    uri.setPort(5060);                                                

                    sipRequest.setRequestURI(uri);


                   //message content
                    sipRequest.setContent("foo-bar", "text/plain");
                    logger.info("sipRequest= " + sipRequest);
                    sipRequest.send();
            } catch (ServletParseException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
            } catch (UnsupportedEncodingException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
            } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
            }

    }

любая помощь / совет будет отличным.

заранее спасибо.

0 ответов

Другие вопросы по тегам