Re: [Freeswitch-dev] Testing mod_sms
________________________________ From: Warren Lin <wlin121443@yahoo.com> To: "freeswitch-dev@lists.freeswitch.org" <freeswitch-dev@lists.freeswitch.org> Cc: Anthony Minessale <anthony.minessale@gmail.com> Sent: Saturday, February 25, 2012 11:58 AM Subject: Re: Testing mod_sms Hi, Anthony, Sorry for the late reply, I can only do the test over weekend... to re-cap, I was testing "a message was sent while target cell phone was off" , hopefully to get a notice when such non-delivery happens. Or someway , somehow to tell if a message was successfuly sent to target cell phone or not (not to the freeswitch). it looks like your patch did send out an event in this situation. but that causes another problem. freeswitch is trying to re-send the message again and again without any waiting in between....that took over whole CPU and hung my machine.... I would like to make following suggestion with my narrow view scope (I am using ESL) . see if it can be used to fit a broader scope. (1) mod_sms is mostly used by external programs such java client or php.... Is that possible let the application programer to decide to do the "re-send" or not. in the case of progammer decide to do the re-send, they should be able to define the re-send frequency and how many time it re-sends. At the end of re-trying. there will be an event to tell the re-try fail or not. Or make life easier, just leave the logic to the application programmer. "do not re-send at all". but do issue an Event. (this event needs some id, pls see #2 as follows.. (2) I could not examine the detail of the event you send back for the non-delivery ( since my machine hung, need to reboot. lost all the message on the console). but anyhow, in the event, hopefully there is some correlation-id. to help programmer to see which message was sent sucessfully which one is not.... in this case, there will be one id to return from two different places. one id return right on the call returnEvt=con.sendEvent(evt); the other is when you generates non-delivery event. so that they can be related. Hmm....I briefly traced the code. this implemention "might" need big surgery on existing code...(just maybe since I don't know too well about the code...) but least, on the non-delivery event, if you can keep ORIGINAL "to" "from" "event-timestamp" in the header. so a programmer can co-relate back the original msg. this is just my 2 cents. BTW, I am also looking into "clustering" freeswtich without using iptel.org. could you give me some heads-up. since I google this topic. but not many good solutions... Thanks Warren ________________________________ From: Anthony Minessale <anthony.minessale@gmail.com> To: Warren Lin <wlin121443@yahoo.com> Sent: Tuesday, February 21, 2012 11:01 AM Subject: Re: Testing mod_sms hi you can find out how to use the lists at http://lists.freeswitch.org try latest GIT, i put in a patch to fire the events with the heder Failed-Delivery true if you are listening for MESSAGE events you should catch them. On Mon, Feb 20, 2012 at 10:25 PM, Warren Lin <wlin121443@yahoo.com> wrote:
Hi Anthony,
Found your e-mail address on the one of freeswitch discussion thread. do not know how to post a msg there. so, I send this mail. hopefully you can get this.
I have used you mod_sms with ESL and Xlite, that works very well. but it looks like there is no way to get the message delivery confirmation back from freeswitch.
on this senario, a message were sent out while target cell phone was off.
I used ESL in java to test this senario. I do see something from the log...
.... 2012-02-20 16:55:03.144870 [WARNING] sofia_presence.c:194 Not sending to local box for 2001@xxx.xxx.xxx 2012-02-20 16:55:03.144870 [ERR] sofia_presence.c:243 Chat proto [global] .... ... Nobody to send to: Profile internal ... but ESL can not see any "Event" for this non-delivery... Is there any way to trap this event on ESL side?
Warren
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
participants (1)
-
Warren Lin