[asterisk-bugs] [Asterisk 0013617]: [patch] SMS app ignores parameter 'p' - initial pause

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Oct 8 14:02:18 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13617 
====================================================================== 
Reported By:                alecdavis
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13617
Category:                   Applications/app_sms
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     confirmed
Asterisk Version:           1.6.0-rc6 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-10-03 23:41 CDT
Last Modified:              2008-10-08 14:02 CDT
====================================================================== 
Summary:                    [patch] SMS app ignores parameter 'p' - initial
pause
Description: 
Can be tested without any actual sms equipment.
 
dialplan code:
 exten => 8507,1,NoOp(SMS Test extension)
 exten => 8507,n,Answer()
 exten => 8507,n,SMS(sms,atp350)
 exten => 8507,n,Hangup()

modified app_sms.c -> sms_exec:
        h.smsc = ast_test_flag(&sms_flags, OPTION_BE_SMSC);
        h.protocol = ast_test_flag(&sms_flags, OPTION_TWO) ? 2 : 1;

        if (!ast_strlen_zero(sms_opts[OPTION_ARG_PAUSE])){
                h.opause_0 = atoi(sms_opts[OPTION_ARG_PAUSE]);
                ast_log(LOG_NOTICE, "Initial Delay [%d]ms override\n",
h.opause_0);        /* Debug: this line is never shown!!!!!!! */
        }
        if (h.opause_0 < 25 || h.opause_0 > 2000){
                ast_log(LOG_WARNING, "Initial Delay [%d]ms out of range.
Default 300ms\n", h.opause_0);          /* added for DEBUG */
                h.opause_0 = 300;       /* default 300ms */
        }

console output:
    -- Executing [8507 at trusted:1] NoOp("IAX2/aldhome-1248", "SMS Test
extension") in new stack
    -- Executing [8507 at trusted:2] Answer("IAX2/aldhome-1248", "") in new
stack
    -- Executing [8507 at trusted:3] SMS("IAX2/aldhome-1248", "sms,atp350")
in new stack
 sms argc 2 queue <sms> opts <atp350> addr <> body <>
[Oct  4 17:47:03] WARNING[16702]: app_sms.c:1806 sms_exec: Initial Delay
[0]ms out of range. Default 300ms
    -- SMS TX 7F 00

======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0013646 [patch] ignores 'p' parameter, received...
====================================================================== 

---------------------------------------------------------------------- 
 (0093378) Corydon76 (administrator) - 2008-10-08 14:02
 http://bugs.digium.com/view.php?id=13617#c93378 
---------------------------------------------------------------------- 
The "extraneous braces" are now required, as per the coding guidelines. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-10-08 14:02 Corydon76      Note Added: 0093378                          
======================================================================




More information about the asterisk-bugs mailing list