[prev in list] [next in list] [prev in thread] [next in thread] 

List:       asterisk-dev
Subject:    Re: [asterisk-dev] [Code Review] New application JabberReceive,
From:       "Philippe Sultan" <philippe.sultan () gmail ! com>
Date:       2008-12-24 16:23:46
Message-ID: 20081224162346.22733.36930 () hotblack ! digium ! internal
[Download RAW message or body]


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/88/
-----------------------------------------------------------

(Updated 2008-12-24 10:23:46.684164)


Review request for Asterisk Developers.


Changes
-------

Updated to address Russell's review. Thanks a lot for reviewing the code Russell!


Summary
-------

JabberReceive is a dialplan application that makes Asterisk wait for an XMPP message \
from a given user (identified with his JID), and store the content in a dialplan \
variable.

It can be used for example to notify a user (via XMPP) that a call is coming, and \
read input back from him. Taken from the documentation :
In the following example, calls targeted to extension 1234 (be it 
accessed from SIP, DAHDI or whatever channel type) are controlled by
user bob@jabber.org. Asterisk notifies him that a call is coming, and
asks him to take an action. This dialog takes place over an XMPP chat.

context from-ext {
	1234 => {
		Answer();
		JabberSend(asterisk-xmpp,bob@jabber.org,Call from $CALLERID(num) - choose an option \
to process the call);  JabberSend(asterisk-xmpp,bob@jabber.org,1 : forward to \
cellphone);  JabberSend(asterisk-xmpp,bob@jabber.org,2 : forward to work phone);
		JabberSend(asterisk-xmpp,bob@jabber.org,Default action : forward to your \
voicemail);  JabberReceive(bob@jabber.org,OPTION,20);
		switch (${OPTION}) {
			case 1:
	  			JabberSend(asterisk-xmpp,bob@jabber.org,(Calling cellphone...);
				Dial(SIP/987654321);
				break;
			case 2:
				JabberSend(asterisk-xmpp,bob@jabber.org,(Calling workphone...);
				Dial(SIP/${EXTEN});
				break;
			default:
				Voicemail(${EXTEN}|u)
		}
	}
}

The diff also includes an implementation of SendText as XMPP messages in both \
chan_jingle and chan_gtalk.

The corresponding bug contains more use cases : \
http://bugs.digium.com/view.php?id=12569


This addresses bug 12569.
    http://bugs.digium.com/view.php?id=12569


Diffs (updated)
-----

  http://svn.digium.com/svn/asterisk/trunk/CHANGES 166765 
  http://svn.digium.com/svn/asterisk/trunk/channels/chan_gtalk.c 166765 
  http://svn.digium.com/svn/asterisk/trunk/channels/chan_jingle.c 166765 
  http://svn.digium.com/svn/asterisk/trunk/configs/jabber.conf.sample 166765 
  http://svn.digium.com/svn/asterisk/trunk/doc/jabber.txt 166765 
  http://svn.digium.com/svn/asterisk/trunk/res/res_jabber.c 166765 

Diff: http://reviewboard.digium.com/r/88/diff


Testing
-------


Thanks,

Philippe


_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic