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

Asterisk Bug Tracker noreply at bugs.digium.com
Sat Oct 4 00:34:44 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:                     new
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-04 00:34 CDT
====================================================================== 
Summary:                    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

====================================================================== 

---------------------------------------------------------------------- 
 (0093150) alecdavis (reporter) - 2008-10-04 00:34
 http://bugs.digium.com/view.php?id=13617#c93150 
---------------------------------------------------------------------- 
My dialplan syntax was wrong, but still initial delay is ignored.
As soon as the line is answered you hear the initial FSK tones, when there
should be a delay of 2 seconds.

dialplan code:
exten => 8507,1,NoOp(SMS Test extension)
exten => 8507,n,Answer()
exten => 8507,n,SMS(sms,atp(2000))
exten => 8507,n,NoOp(SMS Finished)
exten => 8507,n,Hangup(21)

console output:
  -- Executing [8507 at trusted:1] NoOp("IAX2/aldhome-4760", "SMS Test
extension") in new stack
    -- Executing [8507 at trusted:2] Answer("IAX2/aldhome-4760", "") in new
stack
    -- Executing [8507 at trusted:3] SMS("IAX2/aldhome-4760",
"sms,atp(2000)") in new stack
 sms argc 2 queue <sms> opts <atp(2000> addr <> body <>
[Oct  4 18:42:07] NOTICE[18624]: app_sms.c:1803 sms_exec: Initial Delay
[2000]ms override
    -- SMS TX 7F 00

Alec 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-10-04 00:34 alecdavis      Note Added: 0093150                          
======================================================================




More information about the asterisk-bugs mailing list