我正在使用mjsip sip堆栈进行软件电话项目.Mjsip仅支持g711或PCMA/PCMU编解码器.我已将G729添加到我的项目中.当我构建项目时,它没有显示错误.但是当手机连接时,呼叫建立,没有语音传输,实际上我的应用程序不生成任何rtp数据包.并在日志中显示错误
java.lang.NullPointerException
RtpStreamReceiver - run -> Terminated.
at local.media.RtpStreamReceiver.run(RtpStreamReceiver.java:171)
Run Code Online (Sandbox Code Playgroud)
我没找到错误.
这是我的RtpStreamReceiver.java类.
package local.media;
import local.net.RtpPacket;
import local.net.RtpSocket;
import java.io.*;
import java.net.DatagramSocket;
import org.flamma.codec.SIPCodec;
/** RtpStreamReceiver is a generic stream receiver.
* It receives packets from RTP and writes them into an OutputStream.
*/
public class RtpStreamReceiver extends Thread {
public static int RTP_HEADER_SIZE = 12;
private long start = System.currentTimeMillis();
public static final int SO_TIMEOUT = 200; // Maximum blocking time, spent waiting for reading new bytes [milliseconds]
private …Run Code Online (Sandbox Code Playgroud) 我正在使用Mjsip来创建一个软电话.在代码中有三种类型的音频分层选项.
我没有使用RAT.它的价值被我自己弄错了.这是调用JMF的代码:
public JMFAudioLauncher(int local_port, String remote_addr, int remote_port, int direction, Log logger)
{
log=logger;
localport=local_port;
remoteport=remote_port;
remoteaddr=remote_addr;
// Patch for working with JMF with local streams
if (remote_addr.startsWith("127."))
{
printLog("Patch for JMF: replaced local destination address "+remote_addr+" with 255.255.255.255");
remote_addr="255.255.255.255";
}
dir=direction;
if (dir>=0) sender=new JMediaSender("audio",null,remote_addr,remote_port);
if (dir<=0) receiver=new JMediaReceiver("audio",local_port,null);
}
/** Starts media application */
public boolean startMedia()
{
printLog("launching JMF-Audio...");
String err1=null, err2=null;
if (sender!=null) err1=sender.start();
if (err1!=null) printLog("Error trying to send …Run Code Online (Sandbox Code Playgroud) 我刚刚为clickonce应用程序部署了一个更新.我已经部署了几十个更新,没有任何问题.现在突然间,通过此更新,我的所有用户都报告此错误:
错误摘要
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of C:\Users\XXX\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\XXX\XXX\XXX.appref-ms| resulted in exception. Following failure messages were detected:
+ Activation failed.
+ The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
Run Code Online (Sandbox Code Playgroud)
在此操作期间检测到以下错误.
* [3/15/2012 3:22:34 PM] System.Deployment.Application.DeploymentException (Activation)
- Activation failed.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.ComponentStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter)
at System.Deployment.Application.SubscriptionStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter)
at System.Deployment.Application.ApplicationActivator.Activate(DefinitionAppId appId, …Run Code Online (Sandbox Code Playgroud) 我在我的应用程序中使用highcharts,并希望添加千位分隔符的工具提示,就像我在数据标签中所做的那样.我使用工具提示的自定义格式,所以我应该改变什么来实现这一点
highcharts中的工具提示选项
tooltip: {
formatter: function () {
return (this.x + ':' + this.y);
},
shared: true,
useHTML: true
},
Run Code Online (Sandbox Code Playgroud)
我有一个查询,如果一个名为OrderBy的标志是1,那么它是一个日历事件,我需要检查两个日期时间字段之间的范围.而所有其他类型我们只是检查你正在查看的那一天.我研究if语句并看到很多帖子,其中建议使用一个案例,所以我试着将它实现到我的查询中.我的查询需要在哪里的条件.我知道我有语法问题,这就是为什么我在这里希望有人可以指出正确的方法来做到这一点.
感谢您的时间
我的查询目前
SELECT activities.*,
activitytypes.orderby
FROM activities
LEFT OUTER JOIN activitytypes
ON activities.typeid = activitytypes.typeid
WHERE activities.userid = 86
AND activities.typeid NOT IN ( 5,
10,
11,
12,
19 )
AND
CASE
WHEN activities.orderby = 1 THEN activities.starttime >= '2013-08-26 04:00:00'
AND activities.endtime <= '2013-08-27 04:00:00'
ELSE activities.activitydate = '2013-08-26'
order BY activitytypes.orderby,
activities.starttime
Run Code Online (Sandbox Code Playgroud) 我使用jQuery 插件将HTML表导出到Excel.使用chrome的下载文件名总是download.xls使用mozilla firefox random-string.xls.我希望根据日期创建文件名.例如23-06-2014.xls.
下面是视图文件中的自定义JS块
$(document).ready(function () {
$("#btnExport").click(function () {
$("#account_table").btechco_excelexport({
containerid: "account_table",
datatype: $datatype.Table
});
});
});
Run Code Online (Sandbox Code Playgroud) 在我的View页面中,jquery Ajax就是这样调用的
onclick: function() {
$.ajax({
type:'POST',
url:"<?PHP echo base_url('trand/report/checking'); ?>",
data: {nm:'vnky'},
success: function(){
alert("success");
},
error: function(){
alert("error");
}
});
chart2.exportChart({
type: 'image/png',
filename: dynmicfilename
});
}
Run Code Online (Sandbox Code Playgroud)
exportchart函数工作正常.内部ajax调用也工作警报很好,但url没有执行,通过使用firebug单击新选项卡中的URL,然后它工作正常.
如何在ajax调用中执行url.你可以帮忙吗?
我的路线代码
return View::make('test')->with('foo', foo::all()->with('foos', 'bars'));
Run Code Online (Sandbox Code Playgroud)
为什么这是抛出这个异常?
我有两个表user和treeview.从我的注册表中我想将数据传递给这些表.比如我想通过username对user表和sponsor ID对treeview表.对于单个表我使用以下约定.
public function add_user()
{
$data=array(
'user_name'=>$this->input->post('fullname'),
'sponsor_id'=>$this->input->post('sponsor_id'),
);
$this->db->insert('user',$data);
}
Run Code Online (Sandbox Code Playgroud)
对于多表,我该怎么办?
我的自定义功能不起作用.我正在检查数据库中是否存在传递的值,它返回错误消息.我做错了什么?
控制器功能
function sp_exists($str)
{
$this->user_model->sp_exists($str);
$this->form_validation->set_message('sp_exists', 'The %s field does not exists');
}
Run Code Online (Sandbox Code Playgroud)
模型功能
function sp_exists($str)
{
$this->db->where('member_id',$str);
$query = $this->db->get('user');
if ($query->num_rows() > 0)
{
return false;
}
else
{
return true;
}
}
Run Code Online (Sandbox Code Playgroud)
回调函数
$this->form_validation->set_rules('sponsor_id', 'Sponsor ID', 'trim|required|xss_clean|callback_sp_exists');
Run Code Online (Sandbox Code Playgroud) codeigniter ×3
rtp ×3
java ×2
jquery ×2
ajax ×1
c# ×1
case ×1
clickonce ×1
compilation ×1
conditional ×1
controller ×1
deployment ×1
dll ×1
eloquent ×1
highcharts ×1
jmf ×1
laravel ×1
laravel-4 ×1
mjsip ×1
mysql ×1
sip ×1
validation ×1
visual-c++ ×1
voip ×1
where ×1