[Freeswitch-dev] Chat Dialplan

Anthony Minessale anthony.minessale at gmail.com
Thu Jul 7 05:21:43 MSD 2011


I think the missing point is that you are terminating point for the
user so the foo+1234 *is* what people use as the user name when
talking to the system.   Whatever you clearly are not interested in
that......

You basically want to modify every channel to fire an event when it
gets an inbound chat message so anybody can subscribe to them.
SWITCH_EVENT_MESSAGE is already used for something you will need
SWITCH_EVENT_RECV_MESSAGE

similar to mod_dptools.c 3260

and put it at sofia_presence.c 2921 inside the else


this really should be wrapped into a profile param to enable it so
it's not firing all these events unless someone really wants it to.
see endless config options being parsed in config_sofia and
reconfig_sofia that set profile flags......


Now tell all your friends at Berkeley to come to ClueCon this year and
we'll see about a student discount!











On Wed, Jul 6, 2011 at 7:50 PM, Kurtis Heimerl <kheimerl at cs.berkeley.edu> wrote:
> Let me repeat myself: the changes I am proposing will be backwards
> compatible. Nothing will be broken.
>
> The dialplan abstraction is tangential to this whole discussion. I can
> build a mod foo which runs the dialplan, and have all messages routed
> to it via the + mechanism. This will probably be my initial version of
> the system. I understand the work you put into this, and that your
> decisions were well-reasoned for the use cases you envisioned (e.g.,
> conference calls), but the abstraction isn't working for me. This
> system is just a piece, interoperating with a variety of other
> systems. Attaching a specific module tag, used by just one piece of
> one program, to a username in use throughout the entire system is not
> an elegant solution. This means I have to put a proxy in front of FS,
> adding this + tag to every message coming in.
>
> I'm here and open to any solutions you might have to make the existing
> solution work for me. Fundamentally, I can't just shove a +tag onto
> every incoming message in any elegant way, so far as I know. I think
> that means this entire line of reasoning is just broken for me. Don't
> get me wrong here, I would be really really happy if I didn't have to
> touch sofia to solve this, it's really hard to grok. It's also a lot
> less work for me.
>
> So far, I've proposed one alternate method for doing this. I want
> sofia to generate events and not route messages itself. Then I can
> listen to these perform whatever actions I need to. This may not work,
> and I'm open to implementing any other architectural changes you think
> would enable my use case. You're clearly the guy who knows what to do,
> and your advice is invaluable.
>
> On Wed, Jul 6, 2011 at 5:23 PM, Anthony Minessale
> <anthony.minessale at gmail.com> wrote:
>> you control the user names on your system the prefix+ string is just
>> part of the username people would talk to.
>>
>> for instance ext+ namespace is has auto presence built in so if you
>> add ext+1000 to your list it will auto advertise that it's online.
>>
>> conf+ goes to the conference.
>>
>> conf+888 at server.com will go to FS on server.com and route the chat
>> messages to the mod_conference.
>>
>> so basically you are proposing to try to modify sofia and break the
>> other stuff  because you do not like the prefix string on the user
>> names but its designed to allow you to cross connect protocols, eg
>> mod_sofia has sip+ registered and mod_dingaling has jingle+ so you can
>> use jabber to pass sip+user at domain.com to your buddy list and have it
>> report accurate presence.
>>
>> Basically you make a new module called mod_foo and register the foo namespace.
>> Then on your clients you subscribe to foo+1000 at server.com for instance.
>> Chat messages to that foo namespace will arrive in your code and you
>> have the option to reply to them completely agnostic of the protocol
>> sip, jabber etc.
>>
>> You seem to be asking for advice but then ignoring it coming from the
>> author of all of the above who spent many man hours solving this
>> problem so it would be abstract.  so I'm lost for what else to tell
>> you.
>>
>> Maybe we can confirm that you are simply taken aback by the idea of
>> starting all your usernames with foo+ and simply propose to unravel
>> everything in pursuit of removing it?
>>
>>
>>
>>
>>
>> On Wed, Jul 6, 2011 at 6:14 PM, Kurtis Heimerl <kheimerl at cs.berkeley.edu> wrote:
>>> Nope, normal SIP MESSAGE events, no invites.
>>>
>>> I just need an easy place where an app can look up some variables in
>>> the directory, check presence information, and start a call based on
>>> an incoming chat event. I also need a system that interops with
>>> existing SIP chat services. I don't think the +routing does these for
>>> me.
>>>
>>> On Wed, Jul 6, 2011 at 8:46 AM, Anthony Minessale
>>> <anthony.minessale at gmail.com> wrote:
>>>> Are we talking about that ridiculous new chat concept in SIP where it
>>>> uses INVITES and dialogs?
>>>>
>>>>
>>>> On Wed, Jul 6, 2011 at 12:56 AM, Kurtis Heimerl
>>>> <kheimerl at cs.berkeley.edu> wrote:
>>>>> I think I understand it. Basically, a client can prepend a +code that
>>>>> causes the message to be routed to a specific module. I don't think
>>>>> that fulfills my requirements. This is fine for basic routing, but
>>>>> it's not a very good programmable environment for chat applications,
>>>>> unless I'm missing something, which is always possible.
>>>>>
>>>>> If I am, can you direct me to anything that explains it in a little
>>>>> more depth than your email?
>>>>>
>>>>> On Tue, Jul 5, 2011 at 10:49 PM, Anthony Minessale
>>>>> <anthony.minessale at gmail.com> wrote:
>>>>>> Read my response and my mod conference example again.
>>>>>> You can register a chat callback from any module bound to a particular
>>>>>> namespace.......
>>>>>>
>>>>>> On Jul 6, 2011 12:35 AM, "Michael Collins" <msc at freeswitch.org> wrote:
>>>>>>> On Tue, Jul 5, 2011 at 10:20 PM, Kurtis Heimerl
>>>>>>> <kheimerl at cs.berkeley.edu>wrote:
>>>>>>>
>>>>>>>> I don't think so. I set the ESL to log all events (/event all) from
>>>>>>>> the command line and received no events when sofia received SIMPLE
>>>>>>>> messages. Is that a bug? I had assumed it's intentional.
>>>>>>>>
>>>>>>> I'm 99% sure that those messages never make it up into FS from Sofia. I'd
>>>>>>> go
>>>>>>> look into the code but Sofia is really scary and there's no amount of
>>>>>>> Scooby
>>>>>>> Snacks you could give me to convince me to wander into that creepy old
>>>>>>> code.
>>>>>>> :)
>>>>>>> -MC
>>>>>>
>>>>>> _______________________________________________
>>>>>> Join us at ClueCon 2011, Aug 9-11, Chicago
>>>>>> http://www.cluecon.com 877-7-4ACLUE
>>>>>>
>>>>>> FreeSWITCH-dev mailing list
>>>>>> FreeSWITCH-dev at lists.freeswitch.org
>>>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
>>>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
>>>>>> http://www.freeswitch.org
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Join us at ClueCon 2011, Aug 9-11, Chicago
>>>>> http://www.cluecon.com 877-7-4ACLUE
>>>>>
>>>>> FreeSWITCH-dev mailing list
>>>>> FreeSWITCH-dev at lists.freeswitch.org
>>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
>>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
>>>>> http://www.freeswitch.org
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Anthony Minessale II
>>>>
>>>> FreeSWITCH http://www.freeswitch.org/
>>>> ClueCon http://www.cluecon.com/
>>>> Twitter: http://twitter.com/FreeSWITCH_wire
>>>>
>>>> AIM: anthm
>>>> MSN:anthony_minessale at hotmail.com
>>>> GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
>>>> IRC: irc.freenode.net #freeswitch
>>>>
>>>> FreeSWITCH Developer Conference
>>>> sip:888 at conference.freeswitch.org
>>>> googletalk:conf+888 at conference.freeswitch.org
>>>> pstn:+19193869900
>>>>
>>>> _______________________________________________
>>>> Join us at ClueCon 2011, Aug 9-11, Chicago
>>>> http://www.cluecon.com 877-7-4ACLUE
>>>>
>>>> FreeSWITCH-dev mailing list
>>>> FreeSWITCH-dev at lists.freeswitch.org
>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
>>>> http://www.freeswitch.org
>>>>
>>>
>>> _______________________________________________
>>> Join us at ClueCon 2011, Aug 9-11, Chicago
>>> http://www.cluecon.com 877-7-4ACLUE
>>>
>>> FreeSWITCH-dev mailing list
>>> FreeSWITCH-dev at lists.freeswitch.org
>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
>>> http://www.freeswitch.org
>>>
>>
>>
>>
>> --
>> Anthony Minessale II
>>
>> FreeSWITCH http://www.freeswitch.org/
>> ClueCon http://www.cluecon.com/
>> Twitter: http://twitter.com/FreeSWITCH_wire
>>
>> AIM: anthm
>> MSN:anthony_minessale at hotmail.com
>> GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
>> IRC: irc.freenode.net #freeswitch
>>
>> FreeSWITCH Developer Conference
>> sip:888 at conference.freeswitch.org
>> googletalk:conf+888 at conference.freeswitch.org
>> pstn:+19193869900
>>
>> _______________________________________________
>> Join us at ClueCon 2011, Aug 9-11, Chicago
>> http://www.cluecon.com 877-7-4ACLUE
>>
>> FreeSWITCH-dev mailing list
>> FreeSWITCH-dev at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
>> http://www.freeswitch.org
>>
>
> _______________________________________________
> Join us at ClueCon 2011, Aug 9-11, Chicago
> http://www.cluecon.com 877-7-4ACLUE
>
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>



-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale at hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org
googletalk:conf+888 at conference.freeswitch.org
pstn:+19193869900



More information about the FreeSWITCH-dev mailing list