[asterisk-bugs] [Asterisk 0013595]: SMS receive file name incorrect

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Oct 1 23:18:17 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13595 
====================================================================== 
Reported By:                alecdavis
Assigned To:                Corydon76
====================================================================== 
Project:                    Asterisk
Issue ID:                   13595
Category:                   Applications/app_sms
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     ready for testing
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-01 15:06 CDT
Last Modified:              2008-10-01 23:18 CDT
====================================================================== 
Summary:                    SMS receive file name incorrect
Description: 
using dialplan code
   exten => s,n(SMSMessage),NoOp( SMS MESSAGE )
   exten => s,n,Answer()
   exten => s,n,Wait(2)
   exten => s,n,SMS(test,sat)
   exten => s,n,Hangup()

The above code succesfully collects the message, but the filename is
wrong?
/var/spool/asterisk/sms/morx/test.1970-01-01T12:00:00-9
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0013594 SMS help is incorrect, Typo
====================================================================== 

---------------------------------------------------------------------- 
 (0093064) alecdavis (reporter) - 2008-10-01 23:18
 http://bugs.digium.com/view.php?id=13595#c93064 
---------------------------------------------------------------------- 
patch worked for both typo in sms help and received file name.

I also changed a few lines down in sms_writefile to be find the received
file. 

        o = fopen(fn, "w");
        if (o == NULL){
                ast_log(LOG_ERROR, "Unable to open file [%s]\n", fn);
                return;
        }else{
                ast_log(LOG_NOTICE, "[%s]\n", fn);
        }


Console output look likes this:
Notice the "ast_read_failed" at bottom. happens every time.

    -- Starting simple switch on 'DAHDI/63-1'
    -- Executing [s at cellular:1] NoOp("DAHDI/63-1", "Callerid = ""
<042111>") in new stack
    -- Executing [s at cellular:2] GotoIf("DAHDI/63-1", "1?SMSMessage") in
new stack
    -- Goto (cellular,s,5)
    -- Executing [s at cellular:5] NoOp("DAHDI/63-1", " SMS MESSAGE ") in new
stack
    -- Executing [s at cellular:6] Answer("DAHDI/63-1", "") in new stack
    -- Executing [s at cellular:7] Wait("DAHDI/63-1", "0.5") in new stack
    -- Executing [s at cellular:8] SMS("DAHDI/63-1", "test,at") in new stack
 sms argc 2 queue <test> opts <at> addr <> body <>
    -- SMS TX 7F 00
[Oct  2 17:18:25] NOTICE[3656]: app_sms.c:1690 sms_process: bad stop bit  
 -- SMS RX 11 3D 3B 00 10 01 00 00 11 06 00 00 00 00 00 00 00 12 03 00 00
00 00 13 0C 00 54 65 73 74...
    -- SMS-P2 Par#10 [1]: 00
    -- SMS-P2 Par#11 [6]: 00 00 00 00 00 00
    -- SMS-P2 Par#12 [3]: 00 00 00
    -- SMS-P2 Body#13=[Test message]
    -- SMS-P2 Date#14=530/538 545:546
    -- SMS-P2 Origin#15=[#6421496XXX]
[Oct  2 17:18:26] NOTICE[3656]: app_sms.c:935 sms_writefile:
[/var/spool/asterisk/sms/mtrx/.test.2008-10-02T17:18:26-1]
    -- SMS TX 15 06 04 00 1F 01 00 00
    -- SMS RX 17 00 E9
    -- SMS TX 15 00
[Oct  2 17:18:30] NOTICE[3656]: app_sms.c:1913 sms_exec: ast_read failed
    -- Hungup 'DAHDI/63-1'

The actual file received doesn't however have a leading '.'

Thanks Alec 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-10-01 23:18 alecdavis      Note Added: 0093064                          
======================================================================




More information about the asterisk-bugs mailing list