[svn-commits] kharwell: trunk r408881 - in /trunk: ./ res/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Feb 25 11:47:09 CST 2014


Author: kharwell
Date: Tue Feb 25 11:47:06 2014
New Revision: 408881

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=408881
Log:
res_pjsip_send_to_voicemail: transferring to voicemail for digium phones

Added the ability for transferring directly to voicemail on digium phones.
Added a new module that checks for the presence of a custom header and/or
diversion header within a sip REFER.  If either is found and they specify
a sending to voicemail action then variables are added to the channel
allowing the user access to them in the dialplan.  Dialplan can then be
written that branches based upon these values allowing, for instace, for
a single number to be used for dialing and/or accessing voicemail directly.

Also fixed a problem where the PJSIP_HEADER function was allowing non pjsip
channels through (checked to make sure it has the correct channel type before
proceeding).

Review: https://reviewboard.asterisk.org/r/3245/
........

Merged revisions 408880 from http://svn.asterisk.org/svn/asterisk/branches/12

Added:
    trunk/res/res_pjsip_send_to_voicemail.c
      - copied unchanged from r408880, branches/12/res/res_pjsip_send_to_voicemail.c
Modified:
    trunk/   (props changed)
    trunk/res/res_pjsip_header_funcs.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: trunk/res/res_pjsip_header_funcs.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip_header_funcs.c?view=diff&rev=408881&r1=408880&r2=408881
==============================================================================
--- trunk/res/res_pjsip_header_funcs.c (original)
+++ trunk/res/res_pjsip_header_funcs.c Tue Feb 25 11:47:06 2014
@@ -452,7 +452,7 @@
 						 AST_APP_ARG(header_name); AST_APP_ARG(header_number););
 	AST_STANDARD_APP_ARGS(args, data);
 
-	if (!channel) {
+	if (!channel || strncmp(ast_channel_name(chan), "PJSIP/", 6)) {
 		ast_log(LOG_ERROR, "This function requires a PJSIP channel.\n");
 		return -1;
 	}
@@ -511,7 +511,7 @@
 						 AST_APP_ARG(header_name); AST_APP_ARG(header_number););
 	AST_STANDARD_APP_ARGS(args, data);
 
-	if (!channel) {
+	if (!channel || strncmp(ast_channel_name(chan), "PJSIP/", 6)) {
 		ast_log(LOG_ERROR, "This function requires a PJSIP channel.\n");
 		return -1;
 	}




More information about the svn-commits mailing list