所有
我正在使用c#jamaa smpp libraries v1.4。 当我从SMSC获取delivery_sm时 - 它会尝试解析传入的消息。我有一个问题。 esm_class的传入字节值为4,如屏幕截图所示: 但是Jamaa的EsmClass有下一个值
public enum EsmClass : byte
{
/// <summary>
/// Default SMSC mode, default message type, or no specific features selected
/// </summary>
Default = 0x00,
/// <summary>
/// Datagram mode
/// </summary>
DatagramMode = 0x01,
/// <summary>
/// Forward (i.e. Transaction) mode
/// </summary>
Transaction = 0x02, //Forward mode
/// <summary>
/// Store and forward mode
/// </summary>
StoreAndForward = 0x03,
/// <summary>
/// Short message contains SMSC delivery receipt
/// </summary>
DeliveryReceipt = 0x08,
/// <summary>
/// SME contains ESME delivery acknoledgement
/// </summary>
DeliveryAcknoledgement = 0x08,
/// <summary>
/// SME contains ESME manual/user acknoledgement
/// </summary>
ManualUserAcknoledgement = 0x10,
/// <summary>
/// Short message contains conversion abort (Korean CDMA)
/// </summary>
ConversionAbort = 0x18,
/// <summary>
/// Short message contains intermedicate delivery notification
/// </summary>
IntermediateDeliveryNotification = 0x20,
/// <summary>
/// UDHI Indicator (only relevant for MT network)
/// </summary>
UdhiIndicator = 0x40,
/// <summary>
/// Set Reply path (only relevant for GSM network)
/// </summary>
ReplyPath = 0x80
}
如您所见 - 它等待8值,返回DeliveryReceipt。 出了什么问题?仅仅纠正EsmClass代码就足够了 - 当4值到来时返回DeliveryReceipt?
谢谢。 关于Yuriy。
答案 0 :(得分:1)
看起来esm_class定义不正确。对于deliver_sm中的交货收据,应将其设置为4.如果是MO,则将其设置为0.将此更正为4是完全正常的,您不应该遇到任何问题。如果您需要更多信息,请参阅SMPP协议规范。
答案 1 :(得分:0)
确定。我刚刚将库EsmClass代码修改为 &#34; DeliveryReceipt = 0×04; &#34; 它有效。我正在测试2天,没有遇到任何问题。