Thanks Guys, I'm really happy about the debate, but I haven't gotten an answer.
I'm really looking to send as described in spameden's mail below. I take it i have to edit the file smsbox.c to process multiple messages to multiple recipients. I'll attach the file here for those who want the patch, if I succeed. Best Regards, Michael C. Nwaogu ________________________________ From: spameden <[email protected]> To: Willy Mularto <[email protected]> Cc: "[email protected]" <[email protected]> Sent: Tuesday, October 30, 2012 1:57 AM Subject: Re: XML POST, multiple messages to multiple recipients Concatenated? It's just a multi-part message to the specified number not to multiple numbers. Mike needs a scheme: text1->number1 text2->number2 text3->number3 text4->number4 etc in a single submit of XML form to sendsms 2012/10/30 Willy Mularto <[email protected]> why not set concatenated? by doing so we can send "multiple" sms to multiple destinations, just imo > > > > >On Oct 30, 2012, at 7:47 AM, Alvaro Cornejo wrote: > >> I think what Mike wants to do is sent multiple sms to multiple >> destinations. That is not supported by kannel.... yet >> >> What is supported is one message to multiple destinations!! >> >> Regards >> >> >> Alvaro >> >> |-----------------------------------------------------------------------------------------------------------------| >> Envíe y Reciba Datos y mensajes de Texto (SMS) hacia y desde cualquier >> celular y Nextel >> en el Perú, México y en mas de 180 paises. Use aplicaciones 2 vias via >> SMS y GPRS online >> Visitenos en www.perusms.NET www.smsglobal.com.mx y >> www.pravcom.com >> >> >> On Mon, Oct 29, 2012 at 7:34 PM, spameden <[email protected]> wrote: >>> I think this should be in the user-guide as well :p >>> >>> care to make a patch to the current snapshot and add this, Mike? >>> >>> >>> 2012/10/30 spameden <[email protected]> >>>> >>>> Here is what I've used: >>>> >>>> >>>> <?xml version="1.0" encoding="utf-8"?> >>>> <message> >>>> <submit> >>>> <da> >>>> <number>222222222</number> >>>> <number>1234567</number> >>>> <number>123456</number> >>>> </da> >>>> <oa><number>yosup</number></oa> >>>> >>>> <ud>message number one</ud> >>>> >>>> <from> >>>> <username>your_username</username> >>>> <password>your_pass</password> >>>> </from> >>>> <smsc>mysmsc</smsc> >>>> </submit> >>>> </message> >>>> >>>> curl -X POST -d @xml_post -H "Content-Type: text/xml" >>>> http://localhost:13013/cgi-bin/sendsms >>>> 0: Accepted for delivery >>>> >>>> by looking into kannel's status i can see 3 messages were sent. >>>> >>>> so it's all working correctly, enjoy :) >>>> >>>> >>>> 2012/10/30 spameden <[email protected]> >>>>> >>>>> I was looking into the code actually there is a handling of multiple >>>>> numbers: >>>>> >>>>> from gw/smsbox.c: >>>>> >>>>> 705 /* to (da/number) Multiple tags */ >>>>> 706 xpathObj = xmlXPathEvalExpression(BAD_CAST >>>>> "/message/submit/da/number/text()", xpathCtx); >>>>> 707 if (xpathObj != NULL && >>>>> !xmlXPathNodeSetIsEmpty(xpathObj->nodesetval)) { >>>>> 708 int i; >>>>> 709 >>>>> 710 *tolist = gwlist_create(); >>>>> 711 for (i = 0; i < xpathObj->nodesetval->nodeNr; i++) { >>>>> 712 if (xpathObj->nodesetval->nodeTab[i]->type != >>>>> XML_TEXT_NODE) >>>>> 713 continue; >>>>> 714 xml_string = >>>>> xmlXPathCastNodeToString(xpathObj->nodesetval->nodeTab[i]); >>>>> 715 tmp = octstr_create((const char*) >>>>> xpathObj->nodesetval->nodeTab[i]->content); >>>>> 716 xmlFree(xml_string); >>>>> 717 octstr_strip_blanks(tmp); >>>>> 718 gwlist_append(*tolist, tmp); >>>>> 719 } >>>>> 720 } >>>>> 721 if (xpathObj != NULL) >>>>> 722 xmlXPathFreeObject(xpathObj); >>>>> >>>>> you can clearly see *tolist is being populated with items, now the >>>>> question is what are you doing wrong, maybe XML should be bit different >>>>> >>>>> >>>>> 2012/10/30 Mike Nwaogu <[email protected]> >>>>>> >>>>>> Thanks for getting back, >>>>>> Which file specifically? >>>>>> >>>>>> Best Regards, >>>>>> Michael C. Nwaogu >>>>>> ________________________________ >>>>>> From: spameden <[email protected]> >>>>>> To: Mike Nwaogu <[email protected]> >>>>>> Cc: "[email protected]" <[email protected]> >>>>>> Sent: Monday, October 29, 2012 8:31 PM >>>>>> >>>>>> Subject: Re: XML POST, multiple messages to multiple recipients >>>>>> >>>>>> You can modify kannel's sources to implement this. >>>>>> >>>>>> 2012/10/29 Mike Nwaogu <[email protected]> >>>>>> >>>>>> Hello am I to assume there's no solution to this problem? >>>>>> Its been unanswered for days now. >>>>>> >>>>>> Best Regards, >>>>>> Michael C. Nwaogu >>>>>> ________________________________ >>>>>> From: Mike Nwaogu <[email protected]> >>>>>> To: "[email protected]" <[email protected]> >>>>>> Sent: Friday, October 26, 2012 12:46 PM >>>>>> Subject: Re: XML POST, multiple messages to multiple recipients >>>>>> >>>>>> Hello All, >>>>>> Please can someone help with the queries below. >>>>>> Has Anyone tried this in the past and how did you cross the barrier. >>>>>> I saw a post without response too as early-on as March 2012. >>>>>> Please oblige. >>>>>> >>>>>> Best Regards, >>>>>> Michael C. Nwaogu >>>>>> ________________________________ >>>>>> From: Mike Nwaogu <[email protected]> >>>>>> To: "[email protected]" <[email protected]> >>>>>> Sent: Wednesday, October 24, 2012 3:55 PM >>>>>> Subject: XML POST, multiple messages to multiple recipients >>>>>> >>>>>> Hello All, >>>>>> I'm trying to send many messages at the same time in one XML post, the >>>>>> post is accepted but only the first message "message number one" is sent >>>>>> to >>>>>> all the listed recipients >>>>>> [111111111 and 222222222]. >>>>>> >>>>>> My question is: since Kannel can accept multiple recipients, how do I >>>>>> format the xml to support multiple messages too. >>>>>> >>>>>> My format is as show below. All comments are duly appreciated. >>>>>> >>>>>> ============= START ============ >>>>>> <?xml version="1.0" encoding="utf-8"?> >>>>>> <message> >>>>>> <submit> >>>>>> <da><number>222222222</number></da> >>>>>> <oa><number>98765</number></oa> >>>>>> <ud>message number one</ud> >>>>>> >>>>>> <da><number>111111111</number></da> >>>>>> <oa><number>12345</number></oa> >>>>>> <ud>message number two</ud> >>>>>> >>>>>> <from> >>>>>> <user>foo</user> >>>>>> <pass>bar</pass> >>>>>> </from> >>>>>> </submit> >>>>>> </message> >>>>>> ============= END ============== >>>>>> >>>>>> Best Regards, >>>>>> Michael C. Nwaogu >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>> >>> >> > >Willy Mularto >F300HD+MR18DE (NLC1725) > > > > > > > > > >
