SGIP 联通短信网关问题,高分求解,如果解决我的问题,再送200分

huiwww 2005-06-06 11:05:33
谁有开发过SGIP 联通短信网关程序,有例子发往我的E_mail:yuhuiqiang@unicomgd.com
如果解决我的问题,再送200分
如果有SGIP.dll的开发例子也可以,最好不要有问题的
...全文
205 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
huiwww 2005-06-11
  • 打赏
  • 举报
回复
呵呵,自己搞掂了。哎不能给自己分
gg137zeus 2005-06-10
  • 打赏
  • 举报
回复
up
huiwww 2005-06-10
  • 打赏
  • 举报
回复
定义如下:
SGIPHead=Record
MessageLength :longword; ////消息的总长度(字节)
CommandId :longword; ////命令ID
SNumber1,SNumber2,SNumber3:longword; ////序列号
end;
XSubmit=Record
SPNumber :array[0..20] of char;
ChargeNumber :array[0..20] of char;
UserCount :byte; //1-100 TelCount;
UserNumber :array[0..20] of char;// 长度为UserCount
CorpID :array[0..4] of char;
ServiceType :array[0..9] of char;
FeeType :byte;
FeeValue :array[0..5] of char;
GivenValue :array[0..5] of char;
AgentFlag :byte;
MOrelatetoMTFlag :byte;
Priority :byte;
ExpireTime :array[0..15] of char;
ScheduleTime :array[0..15] of char;
ReportFlag :byte;
TP_pid :byte;
TP_udhi :byte;
MessageCoding :byte;
MessageType :byte;
MessageLength :longword;
MessageContent :array[0..140] of char; //长度为 MessageLength;
Reserve :array[0..7] of char;
end;

发送如下
DateTimeToString(FV_Date1_S,'mmddhhnnss',now);
DateTimeToString(FV_Date2_S,'zzz',now);
strpcopy(ssubmit.SPNumber,LabeledEdit7.Text); //接入号
strpcopy(ssubmit.ChargeNumber,LabeledEdit8.Text); //收费号码
ssubmit.UserCount :=1;
strpcopy(ssubmit.UserNumber,'86'+LabeledEdit6.Text); // 短信接收号码
strpcopy(ssubmit.CorpID,LabeledEdit9.Text); //企业代码
strpcopy(ssubmit.ServiceType,LabeledEdit10.Text); //业务代码
ssubmit.FeeType :=strtoint(LabeledEdit11.Text); //计费类型
strpcopy(ssubmit.FeeValue,LabeledEdit12.Text); //收费
strpcopy(ssubmit.GivenValue,LabeledEdit13.Text); //赠送话费
ssubmit.AgentFlag :=strtoint(LabeledEdit14.Text); //代收费标志
ssubmit.MOrelatetoMTFlag :=2; //MT消息原因
ssubmit.Priority :=0;
strpcopy(ssubmit.ExpireTime,LabeledEdit16.Text); //超时时间(分钟)
ssubmit.ScheduleTime :='';
ssubmit.ReportFlag :=1; //状态报告标记
ssubmit.TP_pid :=0;
ssubmit.TP_udhi :=0;
ssubmit.MessageCoding :=0;// 短信编码(15-GBK;0-纯ASCII;4-二进制)
ssubmit.MessageType :=0;
ssubmit.MessageLength :=length(trim(memo2.Text));
strpcopy(ssubmit.MessageContent,trim(memo2.Text));// 短信内容
sHead.MessageLength:=htonl(lenghstr-3);
sHead.CommandId:=htonl(SGIP_Submit);
sHead.SNumber1:=htonl(strtoint64(LabeledEdit15.Text));
sHead.SNumber2:=htonl(StrToInt(FV_Date1_S));
sHead.SNumber3:=htonl(StrToInt(FV_Date2_S));
IdTCPClient1.WriteBuffer(shead,sizeof(shead));
IdTCPClient1.WriteBuffer(ssubmit,sizeof(ssubmit)-3);
请各位帮忙
lovcal 2005-06-10
  • 打赏
  • 举报
回复
帮你顶……
huiwww 2005-06-09
  • 打赏
  • 举报
回复
我自己帮自己顶
我现在自己做了,程序登陆验证也通过了,但是,用模拟短信网关老是报
SGIP_Submit body recieve error. error code:-7
连接正式环境则提示短信长度有错
huiwww 2005-06-09
  • 打赏
  • 举报
回复
我发现,当我发送短信到短信模拟网关SGIPGW.exe,返回
SUBMIT SrcNum = 3020032288, DateTime = 309173421, SeqId = 312
SPNumber =
ChargeNumber =
UserCount = 0
CorpId =
ServiceType =
FeeType = 0
FeeValue =
GivenValue =
AgentFlag = 0
MorelatetoMTFlag = 0
Priority = 0
ExpireTime =
ScheduleTime =
ReportFlag = 0
TpPid = 0
TpUdhi = 0
MessageCoding = 0
MessageType = 0
MessageLength = 0
MessageContent =
LinkId1 = 0
LinkId2 = 0

也就是说,我提交的Submit命令没有收到,不知何故
genbin 2005-06-09
  • 打赏
  • 举报
回复
内容是变长的
herman~~ 2005-06-07
  • 打赏
  • 举报
回复
到网上下载一个sgip协议格式书,自己写一个,再下一个模拟网关测试吧
lovend 2005-06-07
  • 打赏
  • 举报
回复
帮你顶
yuwww 2005-06-07
  • 打赏
  • 举报
回复
继续顶上去
lyguo 2005-06-07
  • 打赏
  • 举报
回复
帮你顶

1,593

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 网络通信/分布式开发
社区管理员
  • 网络通信/分布式开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧