Thursday, September 17, 2015

SMPP TON and NPI Reference | Aerialink

SMPP TON and NPI Reference | Aerialink: SMPP TON and NPI Reference

Table of Contents
1.
TON (Type of Number)
2.
NPI (Numbering Plan Identification)
3.
TON and NPI Defaults
4.
SMPP Official Specification
5.
Troubleshooting
6.
Support
API Interface: SMPP API Version 3.4
TON (Type of Number)
The Type of Number (TON) setting is used to tell both your EMSE the format of the addressing (bind addressing) that will be processed for inbound messages as well as tell the Aerialink network (source and destination addressing) how it should be processed for submits. There are three separate pairs of TON and NPI values; receiving addressing, source addressing, and destination addressing. These definitions are derived from the ETSI GSM 03.40 specification, which defines the SMS protocol. The SMPP specification defines the following TON values:

If you wish to specific a special value for the TON, the available options are:

0: Unknown
1: International
2: National
3: Network Specific
4: Subscriber Number
5: Alphanumeric
6: Abbreviated
Aerialink does not generally require specific TON values from your bind to our network. We store specific values as defaults for your routes, connections, and communication assets (Short Code, Long Code, Alphanumeric Code). See TON and NPI defaults below.

NPI (Numbering Plan Identification)
The Numbering Plan Identification setting is used to tell both your EMSE the numbering plan associated with your messaging. The SMPP specification defines the following TON values:

If you wish to specific a special value for the NPI, the available options are:

Unknown = 0
ISDN/telephone numbering plan (E163/E164) = 1
Data numbering plan (X.121) = 3
Telex numbering plan (F.69) = 4
Land Mobile (E.212) =6
National numbering plan = 8
Private numbering plan = 9
ERMES numbering plan (ETSI DE/PS 3 01-3) = 10
Internet (IP) = 13
WAP Client Id (to be defined by WAP Forum) = 18
TON and NPI Defaults
Aerialink will generally default both your TON and NPI to the values they should be to insure your messages are delivered properly. If you have special reasons for controlling these settings on your side, please contact the Aerialink Support Team. The default values used by Aerialink are as follows:

Short Code (3 digits to 8 digits in length)
If the source code/address is a Short Code

TON = 3
NPI = 0
Long Code (10 digits to 15 digits in length, excludes the plus sign)
If the source code/address is a Long Code the recommended settings and default settings that Aerialink will use are:

TON = 1
NPI = 1
Alphanumeric
If the source code/address is Alphanumeric (contains both letters and numbers or only letters)

TON = 5
NPI = 0
SMPP Official Specification
For details on the SMPP Specification, see SMPP 3.4 Official Specification.

Troubleshooting
If you are having trouble authenticating with the Aerialink API confirm that you have white listed your IP address and that your API credentials are correct. You can view the API Authentication Error Log under Reports in the APi section of the Platform portal. This will confirm whether your authentication requests are being rejected or not.

Support
If you require any additional assistance, please use one of these methods to contact the Aerialink Support Team.

This page was last updated 1430774692620

Wednesday, September 16, 2015

Problems with "underscore" character

Problems with "underscore" character: Problems with "underscore" character Search
SMS & MMS Technical Forum � NowSMS Support - SMS Issues (Product Support Only) � Archive through January 23, 2007 � Problems with "underscore" character � Previous || Next �
Author Message
Marcos Nowosad
New member
Username: Mnowosad

Post Number: 6
Registered: 08-2006
Posted on Wednesday, September 20, 2006 - 10:17 pm: ��
When we are sending Mobile-Terminated (MT) messages through nowSMS, we are getting some problems with the underscore ( _ ) character. Depending on the carrier, we have different (incorrect) results:

- In Verizon devices, we get the single quote ( ' ) character.

- In Cingular Orange, we get the paragraph (�) character.

We are currently using the ISO 8859-1 char set, as recommended by our SMSC (mBlox). Every other character is transmitted correctly.

Have you heard about this problem? Is there a workaround?

Thanks,
Marcos
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6563
Registered: 10-2002
Posted on Thursday, September 21, 2006 - 01:41 pm: ��
Hi Marcos,

Do you get the correct character with other carriers?

In the ISO-8859-1 character set, the _ (underscore) character uses code 0x5F.

In the GSM character set, character code 0x5F is � (paragraph). And the underscore is 0x11. (0x11 is not valid in ISO-8859-1.)

So I suspect that there may be some character set confusion with mBlox's upstream SMSC connection ... in other words, the connection from mBlox to these mobile operators.

As a sanity check, you might want to enable the SMSDEBUG.LOG in NowSMS ... and take a cursory look at the SMPPDEBUG.LOG to verify that the _ character is going out as 0x5F (there is a hex dump of the SMPP transactions in this log, so you should be able to verify this fairly easy).

Unfortunately, I don't have any other suggestions. I haven't heard any reports of this before, but maybe others will see this thread and report back if they see any issues.

-bn

smpp协议submit_sm操作的data_coding的一些说明 - widebright的日志 - 网易博客

smpp协议submit_sm操作的data_coding的一些说明 - widebright的日志 - 网易博客: smpp协议submit_sm操作的data_coding的一些说明��

2014-04-09 16:43:04|��分类: 电信协议 |举报|字号�订阅
����
下载LOFTER客户端
1.�GSM Default Alphabet (7-bits),
GSM7位编码,自己client发送时不需要做7bit的压缩(compact/pack),SMSC会在收到消息之后自己再把GSM 7bit的字节流(每个7位的还是分别保留在一个8位的字节里面)的最高为空位压缩掉。
参考网上别人的介绍 �http://www.telecomspace.com/smsforum.net_archive/smf/index00d0.html?topic=1257.0
SMSC应该是有个配置选项,可以设置做或者不做7bit到8bit的转换的,但一般SMSC发过来的消息应该也是把gsm 7bit单独放到一个8bit的字节里面了。有的SMSC也会支持直接使用压缩过最高位的7bit数据的。 如果考虑smpp client和 server的话好像我也还没想到需要自己压缩7bit高位的情况。可能做的是server的话,后续的通过其他协议比如MAP协议的forward-sm操作发送到sigtran网络里面去的话那个消息的user data是需要做这种7bit编码的高位压缩的吧。

具体代码,可以使用开源项目 Kannel 里面的
charset_gsm_to_utf8
charset_utf8_to_gsm
函数来做转换

2.�UCS2 (16-bits)
unicode编码,可以使用libxml代码里面
UTF8ToUTF16BE
UTF16BEToUTF8
函数来做转换吧。

3.�LATIN 1 (8-bits)
可以用libxml代码里面
UTF8Toisolat1
isolat1ToUTF8
函数来做到utf8编码的转换

4.�SMSC default alphabet (7 or 8-bits)
好像根据SMSC的不同,默认可能是7bit也可能是8bit编码,

5. UDH �(User Data Header)
udh数据端也是在放在data里面的。sm_length里面包含这个udh的长度。
UDH段的内容不要做data_coding对应编码的转换,data_coding只针对实际的消息内容。
也就是说UDH不用做gsm 7bit ,ucs这些编码。参见GSM 03.40 规范的说明的

参考�
1.�SMPP_v3_4_Issue1_2.pdf
Short Message Peer to Peer�Protocol Specification v3.4

2..�smppv34_gsmumts_ig_v10.pdf
SMPP v3.4 Protocol Implementationguide for GSM / UMTS�Version 1.0

3. �Data Coding values in SMPP
http://www.telecomspace.com/smsforum.net_archive/smf/index00d0.html?topic=1257.0

相关的电信规范:
GSM 03.38 �Alphabets and language-specific information
GSM 03.40 �Technical realization of the Short Message Service (SMS)�Point-to-Point (PP)
3GPP TS 23.040 �Technical realization of the Short Message Service (SMS)

Monday, September 14, 2015

Centralized Logging �

Centralized Logging �: Centralized Logging
Jan 3, 2012 � 5 minute read � 12 Comments
logging fluentd logstash architecture
Logs are a critical part of any system, they give you insight into what a system is doing as well what happened. Virtually every process running on a system generates logs in some form or another. Usually, these logs are written to files on local disks. When your system grows to multiple hosts, managing the logs and accessing them can get complicated. Searching for a particular error across hundreds of log files on hundreds of servers is difficult without good tools. A common approach to this problem is to setup a centralized logging solution so that multiple logs can be aggregated in a central location.

So what are your options?

File Replication
A simple approach is to setup file replication of your logs to a central server on a cron schedule. Usually rsync and cron are used since they are simple and straightforward to setup. This solution can work for a while but it doesn’t provide timely access to log data. It also doesn’t aggregate the logs and only co-locates them.

Syslog
Another option that you probably already have installed is syslog. Most people use rsyslog or syslog-ng which are two syslog implementations. These daemons allow processes to send log messages to them and the syslog configuration determines how the are stored. In a centralized logging setup, a central syslog daemon is setup on your network and the client logging dameons are setup to forward messages to the central daemon. A good write-up of this kind of setup can be found at: Centralized Logging Use Rsyslog

Syslog is great because just about everything uses it and you likely already have it installed on your system. With a central syslog server, you will likely need to figure out how to scale the server and make it highly-available.

syslog-ng
rsyslog
Distributed Log Collectors
A new class of solutions that have come about have been designed for high-volume and high-throughput log and event collection. Most of these solutions are more general purpose event streaming and processing systems and logging is just one use case that can be solved using them. All of these have their specific features and differences but their architectures are fairly similar. They generally consist of logging clients and/or agents on each specific host. The agents forward logs to a cluster of collectors which in turn forward the messages to a scalable storage tier. The idea is that the collection tier is horizontally scalable to grow with the increase number of logging hosts and messages. Similarly, the storage tier is also intended to scale horizontally to grow with increased volume. This is gross simplification of all of these tools but they are a step beyond traditional syslog options.

Scribe - Scribe is scalable and reliable log aggregation server used and released by Facebook as open source. Scribe is written in C and uses Thrift for the protocol encoding. Since it uses thrift, virtually any language can work with it.

Flume - Flume is an Apache project for collecting, aggregating, and moving large amounts of log data. It stores all this data on HDFS.

logstash - logstash lets you ship, parse and index logs from any source. It works by defining inputs (files, syslog, etc.), filters (grep, split, multiline, etc..) and outputs (elasticsearch, mongodb, etc..). It also provides a UI for accessing and searching your logs. See Getting Started

Chukwa - Chukwa is another Apache project that collects logs onto HDFS.

fluentd - Fluentd is similar to logstash in that there are inputs and outputs for a large variety of sources and destination. Some of it’s design tenets are easy installation and small footprint. It doesn’t provide any storage tier itself but allows you to easily configure where your logs should be collected.

kafka - Kafka was developed at LinkedIn for their activity stream processing and is now an Apache incubator project. Although Kafka could be used for log collection this is not it’s primary use case. Setup requires Zookeeper to manage the cluster state.

Graylog2 - Graylog2 provides a UI for searching and analyzing logs. Logs are stored in MongoDB and/or elasticsearch. Graylog2 also provides the GELF logging format to overcome some issues with syslog message: 1024 byte limit and unstructured log messages. If you are logging long stacktraces, you may want to look into GELF.

splunk - Splunk is commercial product that has been around for several years. It provides a whole host of features for not only collecting logs but also analyzing and viewing them.

Update: I wrote a post comparing Fluentd vs Logstash.

Hosted Logging Services
There are also several hosted “logging as a service” providers as well. The benefit of them is that you only need to configure your syslog forwarders or agents and they manage the collection, storage and access to the logs. All of the infrastructure that you have to setup and maintain is handled by them, freeing you up to focus on your application. Each service provide a simple setup (usuallysyslog forwarding based), an API and a UI to support search and analysis.

loggly
papertrail
logentries
I go into more detail how all of these fit together in Centralized Logging Architecture.

Monday, September 7, 2015

Telephone FAQ

Telephone FAQ

If your question is not listed here, feel free to ask in our mailing list.


How to enable debug information
Quit Telephone, open Terminal and run:

$ defaults write com.tlphn.Telephone LogLevel -integer 4

Launch Telephone, reproduce the problem, quit Telephone, and examine the log file.

To set the default log level:

$ defaults delete com.tlphn.Telephone LogLevel


Where is the log file?

Version 1.0.4 and earlier: ~/Library/Application Support/com.tlphn.Telephone/Telephone.log.
Version 1.1 and later: ~/Library/Containers/com.tlphn.Telephone/Data/Library/Application Support/com.tlphn.Telephone/Telephone.log.

The log file is being overwritten every time Telephone starts.


Problem with outgoing calls when using FritzBox
Enable “Use only G.711 codec” in sound preferences.


Another party hears echo

The most common reason is that another person’s voice from your headphones reaches your microphone. The worst case scenario here is to use internal speakers with the internal microphone. If you don’t have a headset, try to use any headphones with the internal mic. Closed headphones would be even better. But you can help Telephone significantly increase the sound quality using a decent headset. I suggest a USB headset.


How to send tone signals
Just press digits on the keyboard when the call window is active. Asterisk (*) and number sign (#) are also allowed.


Why sending tone signals isn’t working?
When calling regular phones, sending tone singnals must be supported by the VoIP gateway. If the gateway does not support well-known standards (RFC 2833 or SIP INFO DTMF), the signals will not be sent.


How to place a call on hold
Press H in the active call window.


How to mute the microphone during a call
Press M in the active call window.


How to make sip: and tel: links

Don’t use slashes after the URL scheme, for example:
Call John Smith: <a href="sip:user@example.com">Call John Smith</a>
+1-234-567-8901: <a href="tel:+1-234-567-8901">+1-234-567-8901</a>

Unfortunately, version 1.0.4 has a bug that prevents Telephone from dialing the opened URL if Telephone was not launched at the moment when URL was opened. But if Telephone is running at the moment, it should make a call to the opened URL.


How to make a call from a text selection in another application

You need to enable Telephone: Call in OS X Services. Go to System Preferences > Keyboard > Keyboard Shortcuts > Services > Text. Check Telephone: Call and optionally add a keyboard shortcut. Now if you select a text in some application, then right-click on it and go to the Services section, there should be Telephone: Call there. If you click it (and Telephone is running), Telephone should use the selected text as a call destination. It is possible to use a keyboard shortcut instead of clicking and navigating to the Services menu.

osx-services



How to close missed call windows automatically
$ defaults write com.tlphn.Telephone AutoCloseMissedCallWindow -bool YES

Where can I store SIP addresses?
You can save SIP addresses (user@example.com) in Address Book as an email with the custom label “sip”. Telephone autocompletes such addresses and Address Book plug-in shows “Dial with Telephone” for them.

address-book-card



What codecs are supported?

  • G.711 family codec (PCMA, PCMU);
  • Speex/8000 (narrowband), Speex/16000 (wideband), and Speex/32000 (ultra-wideband);
  • iLBC;
  • GSM;
  • L16 family of codecs.

How to enable voice activity detection
$ defaults write com.tlphn.Telephone VoiceActivityDetection -bool YES


Timeout connecting to Asterisk behind VPN
Try setting “nat = yes” in Asterisk to reply to the actual IP address the request came from. (With “nat = no” Asterisk sends the reply to the address from the Contact field.)

Another approach is to set your public address for SIP manually:

$ defaults write com.tlphn.Telephone TransportPublicHost 

But if your VPN server doesn’t assign you the same IP address every time you get connected, this could be inconvenient.


I’m getting ‘423 Interval Too Brief’

phi of n | Some useful technical information for Telephone (Mac OS X Softphone)

phi of n | Some useful technical information for Telephone (Mac OS X Softphone):

Some useful technical information for Telephone (Mac OS X Softphone)

By Maurice13. October 2010 11:41

Telephone has two not so obvious options under Preferences/Network: "Use ICE" and "Use DNS SRV". What do they mean?

In order to find out, I activated Debug logging with defaults write com.tlphn.Telephone LogLevel -integer 4. The log file will be at ~/Library/Logs/Telephone.log.

  • "Use DNS SRV" - this is a discovery method. Telephone checks for the followign DNS records: _sip._udp.<domain-as-specified-by-account>. The lookup is tried twice.
  • "Use ICE" (ICE = Interactive Connectivity Establishment) - this is a NAT traversal technology (explanation of methodology). Telephone seems to use the pjsip.org pjnath module, andthere ICE uses STUN transport. So checking this option is only useful if you also use STUN. I do not use STUN so I get lot's of messages like icetp00 Creating ICE stream transport with n component(s), icetp00  Comp 1: host candidate <local-ip>:<local-port>, addedicetp04  ICE stream transport created,  and finally icetp07  Too many host candidates.
And last - if you want to transfer Telephone-settings from one computer to another, copy the~/Library/Preferences/com.tlphn.Telephone.plist - but remeber that the account password is saved in keychain under the entry SIP: <name-of-domain>. If this entry is not present, Telephone may not start properly.

Tuesday, August 4, 2015

净水器滤芯更换时间_百度经验

净水器滤芯更换时间

  • |
  • 浏览:935
  • |
  • 更新:
  • |
  • 标签:净水器 
正常净水器滤芯更换时间为:第一级PPF过滤棉3个月更换一次,第二级UDF颗粒活性炭6个月更换一次,第三级CTO烧结活性炭9个月更换一次,第四级RO反渗透膜2年更换一次,第五级T33后置活性炭2年更换一次。
怎样才知道自己家里的净水器的过滤滤芯是否该更换了呢?一个是安装上面的时间更换,在有一个窍门,即省事又能节省滤芯更换的频率与金钱。就是在到更换时间时,自己用净水器自带的虑瓶扳手将虑瓶打开(第一级和第三级),目测第一级滤芯的颜色和虑瓶中的清洁度,如滤芯颜色非常重甚至接近于黑棕色了,虑瓶中沉淀有杂质较多的话,那就说明你家的水质较差应该提前更换第一级滤芯,反之颜色很淡,虑瓶里很清洁,这样的话就可以延长第一级滤芯更换时间了。第三级滤芯因为是烧结活性炭棒,所以表面上也会吸附很多的杂质,目测方法同第一级滤芯。至于第二级滤芯,如第三级滤芯应该更换了那,第二级滤芯就必须同时更换。第四级反渗透RO膜,不建议自己更换和打开虑瓶,最好是找专业人士更换。第五级后置活性炭,当第四级滤芯更换时同时更换第五级滤芯。净水器滤芯更换时间_百度经验