|
Re:Elastix SMS module hace 1 Año, 9 Meses
|
Karma: 1
|
jolive
any ideas on what i can do to send over 100 characters via the sms module
please help 
|
|
cheeks
Fresh Boarder
Mensajes: 49
|
|
|
|
|
Re:Elastix SMS module hace 1 Año, 8 Meses
|
Karma: 0
|
cheeks wrote:
jolive
one problem with the sms module
It will Only send up to 70 characters in the text box. You cannot send more than 70 Characters
any ideas what i must do as i need to send at least 100 Characters
please help
You are sending using unicode characters...not normal ASCII. You need to send using normal ASCII text. Each character in unicode takes up 2 bytes not one....so what you can send is more or less halved.
|
|
|
|
|
|
|
Re:Elastix SMS module hace 1 Año, 8 Meses
|
Karma: 1
|
SweetTooth thanks for your reply
So how do i send a message with the sms module text box using normal ASCII text?
ie: what and how do i type in the sms text box to send a message?
i am using normal text in this message i am typing inside this very box replying to your message. how do i use ascii inside the sms text box?
sorry for the noob question 
|
|
cheeks
Fresh Boarder
Mensajes: 49
|
|
|
|
|
Re:Elastix SMS module hace 1 Año, 8 Meses
|
Karma: 0
|
cheeks wrote:
SweetTooth thanks for your reply
So how do i send a message with the sms module text box using normal ASCII text?
ie: what and how do i type in the sms text box to send a message?
i am using normal text in this message i am typing inside this very box replying to your message. how do i use ascii inside the sms text box?
sorry for the noob question
I don't know...it should be a config thing rather than the way you type stuff in. I'm not using the standard supported hardware / SMPP server gateway....I'm just telling the SMS module to call my own script that pumps in the text messages to a Portech MV-372 - which is what I'm just gonna post about tonight.
Right...the documentation is in Spanish...so I've used google translate:
In the current implementation of the module IBEROXARXA SMS message is sent with
one of the following 2 methods, depending on the characters in the message:
• Coding SMS, if the characters in the message belongs to the alphabet
SMS, according to GSM 03.38.
• UNICODE encoding, if the message contains characters outside of the GSM standard
03.38.
In the case of coding the SMS message SMS is sent in units of 160 characters, so
that if the SMS is composed of 170 characters the message is sent using 2 SMS.
In the case of Unicode SMS message is sent in units of 70 characters,
Thus, if the SMS is composed of 170 characters the message is sent using 3 SMS.
In any case, the SMS module IBEROXARXA reports in real time the number of
messages to be used to send the SMS
So..are you absolutely sure, that there is nothing in your message, other than standard ASCII characters?
|
|
|
|
|
|
|
Re:Elastix SMS module - Portech MV-370 / MV-372 hace 1 Año, 8 Meses
|
Karma: 0
|
OK...I run a Portech MV-372 and I haven't seen anything around here other than the test script..so I grabbed the test script...done some testing and moved it along a bit.
Can someone help me out here..we just need to put in the most appropriate exit codes so that the SMS module takes the correct actions etc.
The code below is working, I'm actually using it to run a campaign. I had to be very careful with it...the sleeps might be a bit too long, but it works..it's fairly safe...if the sleeps are too short, then the box will sulk and it won't accept the next connection.
There needs to be a bit better error trapping and exit code. With the right exit code, we can have the campaign stop if the sms gateway can't connect to the Portech box.
| Código: |
#!/usr/bin/php
<?php
$destination = $argv[2];
$text = $argv[3];
function waitEndChar($oSocket,$endChar=">") {
while(1) {
$c = fgetc($oSocket);
if (($c == $endChar)) {
break;
}
}
}
function waitStr($oSocket,$str,$waitPrompt=false,$endChar=">") {
$readed = "";
if ($str != "") {
while (1) {
$char = fgetc($oSocket);
$c = trim($char,"\n\r");
if ($c != "") {
$readed .= $c;
if ($readed == $str) {
if ($waitPrompt) {
waitEndChar($oSocket,$endChar);
break;
}
break;
}
} else {
$readed = "";
}
}
} else {
waitEndChar($oSocket,$endChar);
}
}
function send($destination, $text) {
$strHost = "192.168.1.51";
$strPort = "23";
$errno=0 ;
$errstr=0 ;
$oSocket = fsockopen ($strHost, $strPort, $errno, $errstr, 20);
if (!$oSocket) {
echo "$errstr ($errno)<br>\n";
exit($errno);
} else {
waitStr($oSocket,"username: ");
//echo "username:";
fputs($oSocket, "voip\r\n");
//echo "$strUser\r\n";
waitStr($oSocket,"password: *");
//echo "password: *";
fputs($oSocket, "1234\r\n");
waitStr($oSocket,"****");
//echo "****";
fputs($oSocket, "module1\r");
waitStr($oSocket,"module1");
//echo "module1\r\n";
sleep(2);
fputs($oSocket, "ate1\r");
waitStr($oSocket,"0");
//echo "0\r\n";
fputs($oSocket, "at+cmgf=1\r");
waitStr($oSocket,"0");
//echo "1\r\n";
fputs($oSocket, "at+cmgs=\"" . $destination ."\"\r");
waitStr($oSocket,"",true);
//echo "2\r\n";
fputs($oSocket, $text);
fputs($oSocket, chr(26));
waitStr($oSocket,"0");
//echo "3\r\n";
fclose($oSocket);
sleep(4);
}
}
send($destination, $text);
?>
|
|
|
|
|
|
|
|
Re: Elastix SMS module hace 1 Año, 8 Meses
|
Karma: 0
|
|
Looking at the sample script, it's only giving one return code. Even if I set $stop_trunk to 1...if it's not getting returned, then how would the SMS module know to stop the trunk?
Also, can I ask for a couple of feature requests?
Can you pass from the SMS module to the BASH script an additional parameter? The additional parameter would be the sequence number of the record in campaign.
This would allow people to write trunk modules that can alternate the texts between 2 or more SIM cards.
At the moment, I'm happy to simply write 2 separate trunks for each SIM module on a Portech-MV-372 - But it would be nice to have another trunk module that's capable of spreading the load of one campaign between both SIM modules...also...if someone is lucky to have 4,8 or 16 SIM modules to play with..they might want their campaign balanced between them.
The second feature request is return codes for suspending the trunk for X amount of time in minutes. I can imagine circumstances where if there is a problem with the trunk, it might be better to suspend the trunk rather than stopping it. Some people might have hardware that simply recovers...or hardware that won't send text messages, while someone is using the GSM gateway to make a phone call...
Thanks!
|
|
|
|
|
|
|
Re:Elastix SMS module hace 1 Año, 7 Meses
|
Karma: 0
|
|
Big problem...I've completed one page of campaigns and I can't seem to add any more or at least view what should be the 2nd page.
Any ideas anyone?
|
|
|
|
|
|
|
Re:Elastix SMS module hace 1 Año, 7 Meses
|
Karma: 0
|
|
Ah..sorted..there appears to be no (or little) validation on the phone number data. When I corrected and re-uploaded, all was well.
|
|
|
|
|
|
|
Re:Elastix SMS module hace 1 Año, 7 Meses
|
Karma: 0
|
|
Some issues, I hope the developer of this module is around!
Anyway..some observations.
1) At least for me, if it's working on an SMS campaign and I pause that campaign after it's started...it's not continuing with any other active campaigns.
2) Unicode..where is the logic for when it decides whether the SMS is unicode? Can there be some way that there is a lot more flexibility or a way that an admin can put into the backend user interface, what should be unicode? Or can we tell NEVER to try unicode under any circumstances?
I'll give you an example with this. I wanted to send out a text message with a £ sign in it. Portech get this horribly wrong. Even in their web interface on the hardware, if you put a pound sign in and then try to send using ASCII it will fail..and it fails because they don't even try to convert it from extended ASCII in the web browser to the GSM character set. If one looks at the GSM character set, the £ sign is 0x01 or simply 1 in decimal. Which means that as long we're prepared to convert them to chr$(1) - they'll go through as a GSM character, keeping the 160 SMS limit, without going anywhere near unicode and restricting ourselves to 70 characters needlessly.
Perhaps even a checkbox in the admin end that says the hardware on the trunk can support
GSM 0.38 ???
|
|
|
|
|
|
|
Re:Elastix SMS module hace 1 Año, 7 Meses
|
Karma: 3
|
|
Hi guys,
I'm the module developer, but I have no much time.
In IXXSMSClass, in "send function", there are this line:
$smsAlphabet = $this->isSmsAlphabet($text);
This decides if whe need unicode or not for the text. The idea is that if the message contains a character that is not present in SMS aphabet, then we use unicode.
In the same function there are this line:
$result = $provider->send(($clid!=""?$clid:trim($trunkData['clid'])),$this->normalizeDestination($destination,$trunkData),($smsAlphabet?$text:$this->getUnicode($text)),$trunkData,!$smsAlphabet);
This sends the sms through the correct provider. This function has a $unicode argument, and this argument is set to true if smsAlphabet is set to false.
First you need to test if in the class provider $unicode argument is well set according to the text message.
|
|
jolive
Fresh Boarder
Mensajes: 13
|
|
|
|
|