Keywords: Mode: All keywords (AND) |
Mon Sep 06, 2010 06:27
|
focus: The incoming file fomat is like this :
---------------------------------
From:
From_TOA:
From_SMSC:
Sent:
Received:
Subject: GSM1
Modem: GSM1
IMSI:
Report:
Alphabet: UCS2
Length:
message content
------------------------------------
I failed to get the msg content by using split("\n\n",$msg) or "\x0a\x0a"
so what's the best way to get received msg ?
thanks
|
Fri Sep 03, 2010 08:33
|
focus: Hi keke :
I send many messages to a shot number and it returns messages to the modem .
but , the incoming msg is not in the order of sending msg . for some reason , the first sending msg will not the first one coming back .
Is there an uniq order_id or something to match the sent and the received msg ?
thanks
|
Mon Aug 30, 2010 08:05
|
focus: in the example , there writes:
[queues]
finland = /var/spool/sms/finland
other = /var/spool/sms/other
[providers]
finland = 358, s
other = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
If I use queues of finland and prefix of the destination phone is not 358,
what would happen? massage can't be send ?
|
Thu Aug 12, 2010 07:28
|
focus: Operating system name and version: Linux sms196 2.6.9-42.ELsmp
Version of smsd: Version 3.1.6
Smsd installed from: sources
Name and model of a modem / phone: GSM1
Interface: serial
Hi keke
When I was reading the manual , I found something exciting , I saw words : AT+VTS
Can this smstools help dialing a phone number and play to him a mp3 or wav file on my modem server ?
If yes , any examples?
|
Thu Aug 12, 2010 06:13
|
focus: all problems settled thanks a lot.!
|
Wed Aug 11, 2010 08:31
|
focus: Operating system name and version: linux
Version of smsd: 3.1.6
Smsd installed from: sources
Name and model of a modem / phone:
Interface: serial
in smsd.conf , i write
eventhandler = /usr/local/php/bin/php -f /data0/apache/share/htdocs/html/ev.php
it seems that the script does not work .
I read the manual about 'eventhandler' , it says the script that will execute whenever a message was sent, received or failed.
my question is ;
1, How can I catch the exact event , for example ,i just want to catch the 'sent' event without received and failed event.
2,Is there any problems in the line of eventhandler in smsd.conf I wrote above ?
3,what's the parameter of the php scripts ? I try to use $argv[1] to get it ,but it seems failed. .
|
Wed Aug 04, 2010 04:41
|
focus: yes ,Hex: yes is the problem , I delete this line and try a hexadecimal string copy from someones' blog , it works !
thank you!
but when I try to write my own hexadecimal string , a new problem occurs :
Alphabet:binary
Modem: GSM2
IMSI: 460001254100881
Fail_reason: +CMS ERROR: 38 (Network out of order)
Failed: 10-08-04 12:29:57
PDU: 0071000D91683119114223F40004FF3D0605040B8423F072060A03AE81EAAF828D80B48402056A0045C60C03E4BDA0E5A5BD000801033230322E3130382E33372E3136382F772E706870000101
0605040B8423F081060603AE81EA8D5002056A0045C6080C033230322e3130382e33372e3136382f772e7068700003e4bda0e5a5bd000101
what's that mean?
and , another way , can smstools3 send MMS ?
When you create a wap push message directly in binary format, do not use the Hex: yes header. This header can only be used when a message body is presented using the hexadecimal format.
Your message will probably work when you create a message file with a content:
To: destination (in international format)
Alphabet: binary
<single empty line>
<result from getSMSPush()>
Hexadecimal format is available because manually with editor it's easier to write than binary data. Also, sent messages (if stored) are easier to read when the format is hexadecimal. If necessary, the script can easily create message body in hex format, just output "02 " instead of chr(0x02) etc., and use STRING: or INLINESTRING: for strings. Some linefeeds are also needed.
|
Tue Aug 03, 2010 10:54
|
focus:
Currently the only example of wap push is here.
It looks like you are giving hexadecimal bytes in your message, and the length of a data is not even. Or probably there is a line containing only "„" (single character). In this case comment it out, or remove it.
here is the php code . I wish you can help me out
function getSMSPush($subject, $url)
{
$pushString = "";
$body = "";
// Content_length Pos
// Begin Pos
$body .= chr(0x02);
$body .= chr(0x05); //-//WAPFORUM//DTD SI 1.0//EN
$body .= chr(0x6A); //UTF-8
$body .= chr(0x00); //
$body .= chr(0x45); //<si>
$body .= chr(0xC6); //<indication
$body .= chr(0x0C); //href="http://
$body .= chr(0x03); //
$body .= iconv( "GBK", "UTF-8", $url );
$body .= chr(0x00);
$body .= chr(0x08); // action=signal-high
$body .= chr(0x01); ; // END( of indication attribute list)
$body .= chr(0x03); //
$body .= iconv( "GBK", "UTF-8", $subject ); //
$body .= chr(0x00); //
$body .= chr(0x01); ; // END( of indication attribute list)
$body .= chr(0x01); ; // END( of indication attribute list)
$length = strlen($body);
$pud = "";
$pud .= chr(0x81); //transaction id (connectionless WSP)
$pud .= chr(0x06); //'pdu type (06=push)
$pud .= chr(0x06); //Headers len
$pud .= chr(0x03);
$pud .= chr(0xAE);
$pud .= chr(0x81);
$pud .= chr(0xEA); //content type: application/vnd.wap.sic; charset=utf-8
$pud .= chr(0x8D);
$pud .= chr(0x00);
$pud .= chr(dechex($length)); //content-length
$udh = "";
$udh .= chr(0x06); //User Data Header Length (6 bytes)
$udh .= chr(0x05); //$udh Item Element id (Port Numbers)
$udh .= chr(0x04); //$udh IE length (4 bytes)
$udh .= chr(0x0B);
$udh .= chr(0x84); //destination port number
$udh .= chr(0x23);
$udh .= chr(0xF0); //origin port number
$pushString = $udh . $pud . $body;
return $pushString;
}
|
Tue Aug 03, 2010 10:21
|
focus: I've seen the example before.
'LENGTH // This stops the counting and places the number'
what does 'LENGTH' mean ?
In my program , its' value is strlen(body);
body= 0x020x050x04.....0x010x01 ;
|
Tue Aug 03, 2010 08:43
|
focus: Operating system name and version: Linux sms196 2.6.9-42.ELsmp
Version of smsd: Version 3.1.6
Smsd installed from: sources
Name and model of a modem / phone: GSM1
Interface: serial
I'm trying to send a wappush msg . But it's always failed. The file in /var/spool/sms/failed/ shows:
Fail_reason: Hex presentation error in sms file: incorrect length of data: "„"
what's wrong?
is there any example for wappush sms format ?
many thanks ..
|