[asterisk-users] Asterisk and XMPP (Jabber) : testing new application JabberReceive

Julian Lyndon-Smith asterisk at dotr.com
Thu Jun 12 10:31:22 CDT 2008


Hi Philippe,

thanks for the replies. It all seems sensible.

Now, for a request ;)

How difficult would it be to have a JabberReceive Event *initiate* a 
channel ?

This could be done by specifying a JabberReceiveExtension=foo at bar in 
jabber.conf

So, when a message is received by asterisk, a call is initiated in the 
extension and context defined, and have the jabber message details in 
variables ${JABBERFROM}, ${JABBERMESSAGE} etc etc.

It would also be really useful to be able to initiate AMI commands via 
jabber ;)

Julian

Philippe Sultan wrote:
> Hi Julian,
> 
> [...]
>>> What can you do with it? Well, a direct usage of this application is
>>> to make an easy to use GoogleTalk voice gateway out of Asterisk. Here
>>> is an example (assuming the asterisk-xmpp account is configured) :
>>> context gtalk-in {
>>>     s => {
>>>         NoOp(Caller id : ${CALLERID(all)});
>>>         Answer();
>>>         JabberSend(asterisk-xmpp,${CALLERID(name),Please enter the
>>> number you wish to call);
>>>         JabberReceive(${CALLERID(name)},NEWEXTEN);
>> How can you assume that the message you are waiting for is the right one
>> ? Let's say that you have 10 channels each doing a JabberReceive at the
>> same time - how does the channel know how to get the right message, let
>> alone the right data ?
>>
>> (2 channels may be waiting for a NewExten message, others for a
>> GetSomeDataFromSomeOtherPlace message )
> 
> Well, in the example, as long as you have 10 simultaneous GoogleTalk
> calls from 10 different buddies, that won't be a problem. The first
> argument of JabberReceive is used by the channel to identify the
> Jabber ID it expects to read data from. Therefore, a message coming
> from a specified buddy (identified by his JID) will be passed by
> res_jabber to the channel that is waiting for data from this buddy.
> 
> In the case when several channels are waiting for data from the same
> JID, res_jabber passes the message to every channel that matches.
> Although this is less likely to happen, I tried to address this issue
> by using the <thread> tag to track chat conversations
> (http://www.xmpp.org/extensions/xep-0201.html). Unfortunately, very
> few XMPP clients implement this conversation tracking mechanism (and
> GoogleTalk does not).
> 
> Philippe
> 
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
> 




More information about the asterisk-users mailing list