Daniel-Constantin Mierla writes:
Can you try setting the fault to delayed context,
like:
rpc->fault(dctx, 500, "Wrong ETag");
same thing:
T 2014/12/05 12:40:30.119921 127.0.0.1:6060 -> 127.0.0.1:56354 [AP]
HTTP/1.1 200 OK.
Via: SIP/2.0/TCP 127.0.0.1:56354.
Server: OpenXg SIP Proxy (4.3.0-0 (i386/linux)).
Content-Length: 108.
.
<?xml version="1.0"?>
<methodResponse>
<params>
<param>
<value></value>
</param>
</params>
</methodResponse>
Dec 5 12:40:30 rautu /usr/bin/sip-proxy[5833]: INFO: pua_rpc [pua_rpc.c:222]: publish():
pua_send_publish returned 418
Dec 5 12:40:30 rautu /usr/bin/sip-proxy[5833]: INFO: xmlrpc [xmlrpc.c:2441]:
dispatch_rpc(): reply was not sent
-- juha
...
dctx = rpc->delayed_ctx_new(c);
if (dctx == 0) {
LM_ERR("internal error: failed to create context\n");
rpc->fault(c, 500, "internal error: failed to create context");
return;
}
publ.cb_param = dctx;
publ.source_flag = MI_ASYN_PUBLISH;
ret = pua_send_publish(&publ);
LM_INFO("pua_send_publish returned %d\n", ret);
if (dctx->reply_ctx == 0)
/* callback was successfully executed */
return;
if (ret < 0) {
LM_ERR("pua_send_publish failed\n");
err_ret = err2reason_phrase(ret, &sip_error, err_buf,
sizeof(err_buf), "RPC/PUBLISH") ;
if (err_ret > 0 ) {
rpc->fault(dctx, sip_error, "%s", err_buf);
} else {
rpc->fault(dctx, 500, "RPC/PUBLISH error");
}
}
if (ret == 418) {
rpc->fault(dctx, 500, "Wrong ETag");
}
(&dctx->rpc)->delayed_ctx_close(dctx);
return;
}