[PATCH] Re: XML post and routing problems
Alexander Malysh <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel,gmane.comp.mobile.kannel.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, I think there is a bug in smsbox code and userguide is also wrong. Please try attached patch and let me know whether it helps. Please note that you need <to>smsc-id</to> in your xml request. ???????????? ???????? wrote: > Hello, > > > > This is the second time I will make a post about the same problem. > > > > I am posting XML to kannel and works fine with 1 smsc defined. > > > > If multiple smsc are defined I have no control over which smsc messages > are sent. > > > > I have tried many combinations using allowed, denied and everything that > is written on the user guide but I always get Not routable. Do not try > again > > > > I believe that <to>smsc-id here</to> is not taken into consideration by > kannel, but I cannot solve it. I am using the CVS version of Kannel > > > > ANYBODY KNOWS HOW CAN I FIX THIS? > > > > Thank you in advance > > > > My kannel.log says the following > > 2007-08-01 16:35:12 [1743] [14] WARNING: Cannot find SMSCConn for message > to <mynumber here>, rejected. > > 2007-08-01 16:35:12 [1743] [14] WARNING: Message rejected by bearerbox, no > router! > > > > And my access.log says the following: > > 2007-08-01 16:35:12 DISCARDED SMS [SMSC:] [SVC:tester] [ACT:account+info] > [BINF:billing+info] [from:dinos] [to:mynumber here] [flags:-1:1:-1:-1:31] > [msg:45:746573742020313233343536373839302041421310455A4819494B144D4E1A4F1650 > 185459121A17150D0A0D0A] [udh:0:] > > > > The xml I use to send sms is the following > > > > <message> > > <submit> > > <da><number>mynumber</number></da> > > <oa><number>sender here</number></oa> > > <ud>test%20%201234567890%20AB%13%10EZH%19IK%14MN%1AO%16P%18TY%12%1A%17%15</u > d> > > <udh></udh> > > <dcs> > > <coding>1</coding> > > </dcs> > > <statusrequest> > > <dlr-mask>31</dlr-mask> > > <dlr-url>http://myserver/kannel/kannel_callback.asp?smsbody=%a&smsdatetime=% > t&sender=%p&receiver=%P&smscid=%i&sms_id=%I&dlr=%d&dlr_reply=%A&user_id=%n&b > illing_id=%B&account_id=%o</dlr-url> > > </statusrequest> > > <from> > > <user>tester</user> > > <pass>foobar</pass> > > <account>account+info</account> > > <binfo>billing+info</binfo> > > </from> > > <to>smsc-id here</to> > > </submit> > > </message> > > > > As far as my config is concerned here it is > > > > # SMSC SMPP > > group = smsc > > smsc = smpp > > smsc-id = smsc-id here > > host = XXX.XXX.XXX.XXX > > port = XXXX > > receive-port = XXXX > > smsc-username = XXXXXXXX > > smsc-password = XXXXXXXXXX > > system-type = VMA > > transceiver-mode = TRUE > > #address-range = > > source-addr-ton = 5 > > source-addr-npi = 1 > > dest-addr-ton = 0 > > dest-addr-npi = 1 > > #alt-charset = iso-8859-1 > > allowed-smsc-id = smsc-id here > > #denied-smsc-id = smsc-id here > > > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.5.476 / Virus Database: 269.11.0/929 - Release Date: 31/7/2007 > 5:26 ?? -- Thanks, Alex
xml-req.patch
(text/x-diff, 1.6 KB)
? gw/smskannel.conf-at2
Index: doc/userguide/userguide.xml
===================================================================
RCS file: /home/cvs/gateway/doc/userguide/userguide.xml,v
retrieving revision 1.330
diff -a -u -p -r1.330 userguide.xml
--- doc/userguide/userguide.xml 1 Jun 2007 11:25:42 -0000 1.330
+++ doc/userguide/userguide.xml 1 Aug 2007 21:56:59 -0000
@@ -6433,7 +6433,7 @@ text = "No action specified"
<dlr-url>dlr-url</dlr-url>
</statusrequest>
- <!-- request from Kannel to application -->
+ <!-- request from application to Kannel -->
<from>
<user>username</user>
<username>username</username>
@@ -6443,7 +6443,7 @@ text = "No action specified"
</from>
<to>smsc-id</to>
- <!-- request from application to Kannel -->
+ <!-- request from Kannel to application -->
<from>smsc-id</from>
<to>service-name</to>
Index: gw/smsbox.c
===================================================================
RCS file: /home/cvs/gateway/gw/smsbox.c,v
retrieving revision 1.274
diff -a -u -p -r1.274 smsbox.c
--- gw/smsbox.c 7 Jan 2007 23:53:02 -0000 1.274
+++ gw/smsbox.c 1 Aug 2007 21:56:59 -0000
@@ -727,8 +727,9 @@ static void get_x_kannel_from_xml(int re
/* smsc */
get_tag(*body, octstr_imm("to"), &tmp, 0, 0);
if(tmp) {
- get_tag(tmp, octstr_imm("account"), smsc, 0, 0);
- O_DESTROY(tmp);
+ O_DESTROY(*smsc);
+ *smsc = tmp;
+ tmp = NULL;
}
/* pid */