Standard out log of nowsms | Search |
NowSMS Support Forums ⬆ NowSMS Support - SMS Issues ⬆ Archive through July 28, 2014 ⬆ |
◄ ► |
Author | Message | |||
Otar Onashvili New member Username: Ot_o Post Number: 1 Registered: 02-2014 |
hello, this is the standard out log of nowsms we are using 2014-02-21 19:56:48,52F8D9FA,192.168.22.62,TEL_NUM,OK -- HTTP - SITE.com:80,SMSCRouteName=PROVIDER_NAME;SMSCMsgId=Fri;Text="test4" I'd like to customize it so that it shows HTTP SMSC Provideres response, so that it looks like 2014-02-21 19:56:48,52F8D9FA,192.168.22.62,TEL_NUM,OK -- HTTP - SITE.com:80,SMSCRouteName=PROVIDER_NAME;SMSCMsgId=Fri;Text="test4",PROVIDER_RESPONSE=tralala how can i achieve it? thanks in advance} | |||
Des - NowSMS Support Board Administrator Username: Desosms Post Number: 4824 Registered: 08-2008 |
Hi, What information are you trying to log? NowSMS can be configured to extract a message ID from the HTTP response, which will get added to the log. Would that work? There is a description of how to configure this in another thread: http://support.nowsms.com/discus/messages/1/71256.html If you need more help, please provide more detail about the provider response you are trying to capture. -- Des NowSMS Support | |||
Otar Onashvili New member Username: Ot_o Post Number: 2 Registered: 02-2014 |
When I send sms directly from browser it returns some response text. I want to log that response. (it is being logged to debug log, but i want to append it to the standard log file as i showed in my first message) | |||
Des - NowSMS Support Board Administrator Username: Desosms Post Number: 4826 Registered: 08-2008 |
What I am trying to ask is ... specifically what is this response text that you are after? Could it be parsed from the response like the other thread describes? If it can be parsed it will be logged as a remote system message ID. | |||
Otar Onashvili New member Username: Ot_o Post Number: 3 Registered: 02-2014 |
the response from http smsc looks like that "PHONE_NUMBER:76d1fbcf-da6d-4fa0-8ccd-5d4900f3f5f7:17:OK:0:No Error" can you explain step by step how i can do that ? | |||
Des - NowSMS Support Board Administrator Username: Desosms Post Number: 4827 Registered: 08-2008 |
Edit SMSGW.INI ... under [HTTP - server:port] section header add MessageIDResponsePrefix=PHONE_NUMBER: NowSMS looks for PHONE_NUMBER: in the HTTP response, and assumes that the text that follows is an upstream message ID. Characters that are assumed to indicate the end of a message ID are white space, or ">", "<" (so it works well with XML responses). In the example you gave, NowSMS would parse the following result "76d1fbcf-da6d-4fa0-8ccd-5d4900f3f5f7:17:OK:0:No" (truncate at first white space). In the out log, you would see ;SMSCMsgID=76d1fbcf-da6d-4fa0-8ccd-5d4900f3f5f7:17:OK:0:No -- Des NowSMS Support | |||
Otar Onashvili New member Username: Ot_o Post Number: 4 Registered: 02-2014 |
in my case PHONE_NUMBER is variable. i tried only ":" but it did not work. | |||
Des - NowSMS Support Board Administrator Username: Desosms Post Number: 4829 Registered: 08-2008 |
Hmm ... trying : was a good idea, but the logic also supports parsing an HTTP header response, so that is going to match on a header. I suspect we might have to make a code change to find a solution. Can I get you to enable the SMSDEBUG.LOG ... send another message ... and then email the SMSDEBUG.LOG to nowsms@nowsms.com. Be sure to include Attention: Des on the subject line of the message. Also please post a quick reply here to let me know you sent a log so that I know to look for the e-mail. -- Des NowSMS Support | |||
Otar Onashvili New member Username: Ot_o Post Number: 5 Registered: 02-2014 |
i've sent email . | |||
Des - NowSMS Support Board Administrator Username: Desosms Post Number: 4831 Registered: 08-2008 |
OK ... Our plan is to modify things so that MessageIDResponsePrefix=: could be used. Going back to the example, if we make this change ... In the example you gave, NowSMS would parse the following result "76d1fbcf-da6d-4fa0-8ccd-5d4900f3f5f7:17:OK:0:No" (truncate at first white space). In the out log, you would see ;SMSCMsgID=76d1fbcf-da6d-4fa0-8ccd-5d4900f3f5f7:17:OK:0:No Would that provide enough of a solution? I think we can have this change ready by late Monday. -- Des NowSMS Support | |||
Otar Onashvili New member Username: Ot_o Post Number: 6 Registered: 02-2014 |
for first time yes, it's enough. is here solution for log PHONE_NUMBER also ? :S or no ? | |||
Bryce Norwood - NowSMS Support Board Administrator Username: Bryce Post Number: 8083 Registered: 10-2002 |
Hi Otar, Des has been busy on a project and asked me to follow-up with you. An update has been posted to http://www.nowsms.com/download/nowsms20140228.zip With your scenario, it will allow you to use ":" in the prefix search. Edit SMSGW.INI ... under [HTTP - server:port] section header add MessageIDResponsePrefix=: In the example you gave, NowSMS would parse the following result "76d1fbcf-da6d-4fa0-8ccd-5d4900f3f5f7:17:OK:0:No" (truncate at first white space). In the out log, you would see ;SMSCMsgID=76d1fbcf-da6d-4fa0-8ccd-5d4900f3f5f7:17:OK:0:No -bn Bryce Norwood Now SMS/MMS Support | |||
Otar Onashvili New member Username: Ot_o Post Number: 7 Registered: 02-2014 |
tnx. i've try install now and write to you after testing. | |||
Otar Onashvili New member Username: Ot_o Post Number: 8 Registered: 02-2014 |
hello, sorry, i've been busy for this two weeks. now i have one question, how i can update my installed nowsms to new version that you sent me without losing any data and configured connections? | |||
Des - NowSMS Support Board Administrator Username: Desosms Post Number: 4850 Registered: 08-2008 |
Do not uninstall the existing version. Just run the install for the new version and it will preserve all existing settings. -- Des NowSMS Support | |||
Otar Onashvili New member Username: Ot_o Post Number: 9 Registered: 02-2014 |
i update program to new version but still dose log. here is debug: 16:14:31:979 [21] ThreadProcessConnection: Processing request /Send%20Text%20Message.htm?PhoneNumber=XXXXXXX&Sender=&Text=test3&InfoCharCounte r=&PID=&DCS=&ReceiptRequested=No&DestPort=&DelayUntil=&Submit=Submit&inserter= 16:14:31:979 [21] Debug: 1 recipient entries 16:14:31:981 [21] CheckPreferredRouteMulti: Preferred Recip Match 16:14:31:981 [21] CheckPreferredRouteMulti: HTTP - xxx.xx:80 16:14:31:981 [21] MessageRoutesAdd: 52F90E16.req 16:14:31:981 [21] MessageRoutesAdd: HTTP - xxx.xx:80 16:14:32:361 [15] ThreadProcessModem: Processing 52F90E16.req... 16:14:32:482 [15] ThreadProcessModem: GET /sms/xxxx/sms.php/?msisdn=XXXXX&message=test3&UserName=user&Password=password&mi d=52F90E16 HTTP/1.1 User-Agent: Now SMS/MMS Gateway v2014.02.28 Host: xxxxx Authorization: Basic YWphcmFiZXRfc2VuZGVyOkw3d3ZMZ1NMOHprakdwRg== Accept: */* Connection: close 16:14:33:649 [15] HttpResponseWait: Ok 16:14:33:649 [15] ThreadProcessModem: HTTP/1.1 200 OK Date: Wed, 26 Mar 2014 10:14:59 GMT Server: Apache Content-Length: 66 Connection: close Content-Type: text/html xxxxx:8c740797-8af8-481d-aa2d-33758660d1d9:17:OK:0:No Error 16:14:33:651 [15] WaitForSocketClose: WinSock reported ioctlsocket complete here is SMSOUT-20140326 : 2014-03-26 16:14:33,52F90E16,127.0.0.1,XXXXX,OK -- HTTP - XXX.XX:80,SMSCRouteName=XXXXX;Text="test3" here SMSWEB-20140326 : 2014-03-26 16:14:31,127.0.0.1,,52F90E16,Text,Recip=XXXXX;Text="test3" my SMSGW : [HTTP - XXX.XX:80] MessageIDResponsePrefix=: RouteName=XXXX RootURL=sms/XXXX/sms.php UserName=user Password=passs TemplateText=/?msisdn=@@PhoneNumber@@&message=@@Text@@&UserName=@@UserName@@&Pas sword=@@Password@@&mid=@@MessageID@@ TemplateBinary=/?msisdn=@@PhoneNumber@@&Binary=1&Data=@@Data@@&UDH=@@UDH@@&pid=@ @pid@@&dcs=@@dcs@@ ServerType=Custom HTTPUseAuth=Yes SenderAddressOverride=Yes UseSSL=No RemovePlus=Yes ThreadCount=1 LongTextAsText=Yes RoutePrefOnly=Yes TrackHTTPReceipts=Yes | |||
Des - NowSMS Support Board Administrator Username: Desosms Post Number: 4856 Registered: 08-2008 |
I'm glad you included your full INI file settings, otherwise I wouldn't have guessed the problem. I see the issue. It is not parsed because @@MessageID@@ is included in the URL template. The feature we are trying to use here is designed to support delivery receipts when communicating with HTTP based SMS services. A side effect is that the ID response is parsed and included in the log, which is why we went down the path of trying to use this setting. When @@MessageID@@ is included in the URL template we assume that the upstream server will use our message ID and the MessageIDResponsePrefix setting is ignored. I'm not sure what the side effects are of changing this. Can you safely remove @@MessageID@@ from the URL template ... or does the provider require this identifier? -- Des NowSMS Support | |||
Otar Onashvili New member Username: Ot_o Post Number: 10 Registered: 02-2014 |
he he he :) SMSOUT-20140327 .log 2014-03-27 19:43:24,52F90E2C,127.0.0.1,XXXXXXX,OK -- HTTP - XXXX.XX:80,SMSCRouteName=XXXXX;SMSCMsgId=22232ae2-3f7b-4490-8a3b-c6d69c672a82:17 :OK:0:No;Text="test4" tnx. your solution works |