Module: sip-router
Branch: master
Commit: 4abe2eec5305de4157dc2d0d5dd9511f43c77bf2
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4abe2ee…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Dec 31 00:00:26 2010 +0100
dialplan: specific reply for translation failure
- 404 no translation returned if dp_translate MI command fails to do
dialplan translate
- added extra debug message
---
modules/dialplan/dialplan.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/modules/dialplan/dialplan.c b/modules/dialplan/dialplan.c
index eb546be..4c86778 100644
--- a/modules/dialplan/dialplan.c
+++ b/modules/dialplan/dialplan.c
@@ -532,10 +532,12 @@ static struct mi_root * mi_translate(struct mi_root *cmd, void
*param)
return init_mi_tree(404, "Empty input parameter", 21);
}
+ LM_DBG("trying to translate %.*s with dpid %i\n",
+ input.len, input.s, idp->dp_id);
if (translate(NULL, input, &output, idp, &attrs)!=0){
LM_DBG("could not translate %.*s with dpid %i\n",
input.len, input.s, idp->dp_id);
- return 0;
+ return init_mi_tree(404, "No translation", 14);
}
LM_DBG("input %.*s with dpid %i => output %.*s\n",
input.len, input.s, idp->dp_id, output.len, output.s);