`
xly_971223
  • 浏览: 1289286 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

freeswitch 用ESL 查询sip用户注册状态

 
阅读更多
直接上代码
核心代码
EslMessage response = client.sendSyncApiCommand("sofia xmlstatus", "profile internal reg 1002"); 


    public void sofia_contact()
    {
        Client client = new Client();
        try
        {
            client.connect( host, port, password, 2 );
        }
        catch ( InboundConnectionFailure e )
        {
            log.error( "Connect failed", e );
            return;
        }
        
   //     EslMessage response = client.sendSyncApiCommand( "sofia_contact", "internal/102@192.168.100.201" );
        //回拨两方通话  {origination_caller_id_number=95126,hangup_after_bridge=true,continue_on_fail=true,originate_timeout=60}
   //     EslMessage response = client.sendSyncApiCommand( "originate", " {origination_caller_id_number=95126,hangup_after_bridge=true,continue_on_fail=true,originate_timeout=60}sofia/gateway/pstn/1118601323147 1003 XML default"  );
        
        EslMessage response = client.sendSyncApiCommand("sofia xmlstatus", "profile internal reg 1002");
       // client.
        // 会议回拨
        // originate user/18601323147 conference:conf_uuid-TEST_CON inline
        

        log.info( "Response to 'sofia_contact': [{}]", response );
        for ( Entry<Name, String> header : response.getHeaders().entrySet() )
        {
            log.info( " * header [{}]", header );
        }
        for ( String bodyLine : response.getBodyLines() )
        {
            log.info( " * body [{}]", bodyLine );
        }
        client.close();
    }
分享到:
评论

相关推荐

    FS-ESL_jssip_freeswitch_esl_mixj1i_

    3. **实现JSSIP客户端**:在前端应用中,使用JSSIP库创建SIP用户代理,处理注册、呼叫、媒体流等操作。 4. **建立ESL连接**:在后端,通过TCP连接到FreeSwitch,使用ESL库发送和接收命令。 5. **集成MixJ1i**:根据...

    毕设&课程作业_智能呼叫中心系统 freeswitch esl sip webrtc.zip

    智能呼叫中心系统是一种集成人工智能技术的现代通信平台,它通过FreeSWITCH、ESL、SIP和WebRTC等技术实现高效、智能的电话服务。在这个压缩包中,"毕设&课程作业_智能呼叫中心系统 freeswitch esl sip webrtc.zip...

    FreeSwitch完整的自定义模块定义和改善自定义事件的例子

    FreeSwitch是一款开源的电话交换平台,它支持多种通信协议,如SIP、Skype for Business、WebRTC等,广泛应用于VoIP系统。在FreeSwitch中,开发者可以通过自定义模块来扩展其功能,满足特定需求。本篇文章将深入探讨...

    freeswitch xml_curl模块使用

    在本文中,我们将深入探讨Freeswitch中的XML_CURL模块及其使用方法,特别是在与PHP集成时如何生成XML文件,以及如何用它来替代传统的directory、ivr(交互式语音响应)和dialplan配置。 Freeswitch是一个开源的软...

    FreeSWITCH-Test.zip

    这个测试服务器的主要功能是模拟真实的通话场景,用户可以通过注册并拨打特定的号码(880000或990000)来触发服务。当拨打电话后,服务器会播放一段预设的语音,播放完毕后自动挂断。这样的测试对于验证FreeSWITCH...

Global site tag (gtag.js) - Google Analytics