[asterisk-commits] oej: trunk r89279 - /trunk/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Nov 15 04:26:01 CST 2007
Author: oej
Date: Thu Nov 15 04:26:00 2007
New Revision: 89279
URL: http://svn.digium.com/view/asterisk?view=rev&rev=89279
Log:
Exit early instead of deciding to exit after processing the message.
Modified:
trunk/channels/chan_sip.c
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=89279&r1=89278&r2=89279
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Thu Nov 15 04:26:00 2007
@@ -12297,6 +12297,12 @@
!strcasecmp(c, "application/vnd.nortelnetworks.digits")) {
unsigned int duration = 0;
+ if (!p->owner) { /* not a PBX call */
+ transmit_response(p, "481 Call leg/transaction does not exist", req);
+ sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
+ return;
+ }
+
/* Try getting the "signal=" part */
if (ast_strlen_zero(c = get_body(req, "Signal")) && ast_strlen_zero(c = get_body(req, "d"))) {
ast_log(LOG_WARNING, "Unable to retrieve DTMF signal from INFO message from %s\n", p->callid);
@@ -12311,11 +12317,6 @@
if (!duration)
duration = 100; /* 100 ms */
- if (!p->owner) { /* not a PBX call */
- transmit_response(p, "481 Call leg/transaction does not exist", req);
- sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
- return;
- }
if (ast_strlen_zero(buf)) {
transmit_response(p, "200 OK", req);
@@ -12358,14 +12359,16 @@
} else if (!strcasecmp(c, "application/dtmf")) {
unsigned int duration = 0;
- get_msg_text(buf, sizeof(buf), req);
- duration = 100; /* 100 ms */
-
- if (!p->owner) { /* not a PBX call */
+ if (!p->owner) { /* not a PBX call */
transmit_response(p, "481 Call leg/transaction does not exist", req);
sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
return;
}
+
+
+
+ get_msg_text(buf, sizeof(buf), req);
+ duration = 100; /* 100 ms */
if (ast_strlen_zero(buf)) {
transmit_response(p, "200 OK", req);
More information about the asterisk-commits
mailing list