# sip-spring-boot-starter **Repository Path**: dev_gitee/sip-spring-boot-starter ## Basic Information - **Project Name**: sip-spring-boot-starter - **Description**: sip 国标28181 starter 仅实现了少部分功能 - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 3 - **Created**: 2024-08-18 - **Last Updated**: 2024-08-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### 一、配置 ```yaml sip: logs: 'OFF' server: ip: 127.0.0.1 port: 5060 id: 44010200492000000001 domain: 4401020049 password: admin123 subscribe: catalog: true alarm: false location: false media: ip: 8.32.184.22 port: 8880 media-id: ~ secret: ~ ``` #### 二、核心API #### 2.1 sip - sipMessageTemplate > 封装了常用请求操作 ```java // 获取设备目录信息 @GetMapping("/catalog") public DeferredResult catalog() { DeferredResult result = new DeferredResult<>(60 * 1000L); FutureEvent udp = sipMessageTemplate.getDeviceCatalog("192.168.2.38", 5063, "34020000001320000003", "UDP"); udp.onSuccess(result::setResult); udp.onError(data -> { System.out.println("onError" + data); result.setResult(null); }); udp.onTimeOut(data -> { System.out.println("onTimeOut" + data); result.setResult(null); }); return result; } ```