310
310
<ref type="function">TESTTIME</ref>
311
311
</see-also>
312
312
</application>
313
- <application name="ImportVar" language="en_US">
314
- <synopsis>
315
- Import a variable from a channel into a new variable.
316
- </synopsis>
317
- <syntax argsep="=">
318
- <parameter name="newvar" required="true" />
319
- <parameter name="vardata" required="true">
320
- <argument name="channelname" required="true" />
321
- <argument name="variable" required="true" />
322
- </parameter>
323
- </syntax>
324
- <description>
325
- <para>This application imports a <replaceable>variable</replaceable> from the specified
326
- <replaceable>channel</replaceable> (as opposed to the current one) and stores it as a variable
327
- (<replaceable>newvar</replaceable>) in the current channel (the channel that is calling this
328
- application). Variables created by this application have the same inheritance properties as those
329
- created with the <literal>Set</literal> application.</para>
330
- </description>
331
- <see-also>
332
- <ref type="application">Set</ref>
333
- </see-also>
334
- </application>
335
313
<application name="Hangup" language="en_US">
336
314
<synopsis>
337
315
Hang up the calling channel.
629
607
<ref type="function">SAYFILES</ref>
630
608
</see-also>
631
609
</application>
632
- <application name="SetAMAFlags" language="en_US">
633
- <synopsis>
634
- Set the AMA Flags.
635
- </synopsis>
636
- <syntax>
637
- <parameter name="flag" />
638
- </syntax>
639
- <description>
640
- <para>This application will set the channel's AMA Flags for billing purposes.</para>
641
- <warning><para>This application is deprecated. Please use the CHANNEL function instead.</para></warning>
642
- </description>
643
- <see-also>
644
- <ref type="function">CDR</ref>
645
- <ref type="function">CHANNEL</ref>
646
- </see-also>
647
- </application>
648
610
<application name="Wait" language="en_US">
649
611
<synopsis>
650
612
Waits for some time.
@@ -830,7 +792,7 @@ static int pbx_builtin_answer(struct ast_channel *chan, const char *data)
830
792
char * parse ;
831
793
AST_DECLARE_APP_ARGS (args ,
832
794
AST_APP_ARG (delay );
833
- AST_APP_ARG (answer_cdr );
795
+ AST_APP_ARG (options );
834
796
);
835
797
836
798
if (ast_strlen_zero (data )) {
@@ -848,15 +810,10 @@ static int pbx_builtin_answer(struct ast_channel *chan, const char *data)
848
810
delay = 0 ;
849
811
}
850
812
851
- if (!ast_strlen_zero (args .answer_cdr ) && !strcmp (args .answer_cdr , "i" )) {
852
- /*! \todo We will remove the nocdr stuff for 21 entirely, as part of another review. */
813
+ if (!ast_strlen_zero (args .options ) && !strcmp (args .options , "i" )) {
853
814
return ast_raw_answer (chan );
854
815
}
855
816
856
- if (!ast_strlen_zero (args .answer_cdr ) && !strcasecmp (args .answer_cdr , "nocdr" )) {
857
- ast_log (AST_LOG_WARNING , "The nocdr option for the Answer application has been removed and is no longer supported.\n" );
858
- }
859
-
860
817
return __ast_answer (chan , delay );
861
818
}
862
819
@@ -882,34 +839,6 @@ static int pbx_builtin_incomplete(struct ast_channel *chan, const char *data)
882
839
return AST_PBX_INCOMPLETE ;
883
840
}
884
841
885
- /*!
886
- * \ingroup applications
887
- */
888
- static int pbx_builtin_setamaflags (struct ast_channel * chan , const char * data )
889
- {
890
- ast_log (AST_LOG_WARNING , "The SetAMAFlags application is deprecated. Please use the CHANNEL function instead.\n" );
891
-
892
- if (ast_strlen_zero (data )) {
893
- ast_log (AST_LOG_WARNING , "No parameter passed to SetAMAFlags\n" );
894
- return 0 ;
895
- }
896
- /* Copy the AMA Flags as specified */
897
- ast_channel_lock (chan );
898
- if (isdigit (data [0 ])) {
899
- int amaflags ;
900
- if (sscanf (data , "%30d" , & amaflags ) != 1 ) {
901
- ast_log (AST_LOG_WARNING , "Unable to set AMA flags on channel %s\n" , ast_channel_name (chan ));
902
- ast_channel_unlock (chan );
903
- return 0 ;
904
- }
905
- ast_channel_amaflags_set (chan , amaflags );
906
- } else {
907
- ast_channel_amaflags_set (chan , ast_channel_string2amaflag (data ));
908
- }
909
- ast_channel_unlock (chan );
910
- return 0 ;
911
- }
912
-
913
842
/*!
914
843
* \ingroup applications
915
844
*/
@@ -1531,41 +1460,6 @@ static int pbx_builtin_sayphonetic(struct ast_channel *chan, const char *data)
1531
1460
return res ;
1532
1461
}
1533
1462
1534
- static int pbx_builtin_importvar (struct ast_channel * chan , const char * data )
1535
- {
1536
- char * name ;
1537
- char * value ;
1538
- char * channel ;
1539
- char tmp [VAR_BUF_SIZE ];
1540
- static int deprecation_warning = 0 ;
1541
-
1542
- if (ast_strlen_zero (data )) {
1543
- ast_log (LOG_WARNING , "Ignoring, since there is no variable to set\n" );
1544
- return 0 ;
1545
- }
1546
- tmp [0 ] = 0 ;
1547
- if (!deprecation_warning ) {
1548
- ast_log (LOG_WARNING , "ImportVar is deprecated. Please use Set(varname=${IMPORT(channel,variable)}) instead.\n" );
1549
- deprecation_warning = 1 ;
1550
- }
1551
-
1552
- value = ast_strdupa (data );
1553
- name = strsep (& value ,"=" );
1554
- channel = strsep (& value ,"," );
1555
- if (channel && value && name ) { /*! \todo XXX should do !ast_strlen_zero(..) of the args ? */
1556
- struct ast_channel * chan2 = ast_channel_get_by_name (channel );
1557
- if (chan2 ) {
1558
- char * s = ast_alloca (strlen (value ) + 4 );
1559
- sprintf (s , "${%s}" , value );
1560
- pbx_substitute_variables_helper (chan2 , s , tmp , sizeof (tmp ) - 1 );
1561
- chan2 = ast_channel_unref (chan2 );
1562
- }
1563
- pbx_builtin_setvar_helper (chan , name , tmp );
1564
- }
1565
-
1566
- return (0 );
1567
- }
1568
-
1569
1463
/*! \brief Declaration of builtin applications */
1570
1464
struct pbx_builtin {
1571
1465
char name [AST_MAX_APP ];
@@ -1583,7 +1477,6 @@ struct pbx_builtin {
1583
1477
{ "Goto" , pbx_builtin_goto },
1584
1478
{ "GotoIf" , pbx_builtin_gotoif },
1585
1479
{ "GotoIfTime" , pbx_builtin_gotoiftime },
1586
- { "ImportVar" , pbx_builtin_importvar },
1587
1480
{ "Hangup" , pbx_builtin_hangup },
1588
1481
{ "Incomplete" , pbx_builtin_incomplete },
1589
1482
{ "NoOp" , pbx_builtin_noop },
@@ -1598,7 +1491,6 @@ struct pbx_builtin {
1598
1491
{ "SayNumber" , pbx_builtin_saynumber },
1599
1492
{ "SayOrdinal" , pbx_builtin_sayordinal },
1600
1493
{ "SayPhonetic" , pbx_builtin_sayphonetic },
1601
- { "SetAMAFlags" , pbx_builtin_setamaflags },
1602
1494
{ "Wait" , pbx_builtin_wait },
1603
1495
{ "WaitDigit" , pbx_builtin_waitdigit },
1604
1496
{ "WaitExten" , pbx_builtin_waitexten }
0 commit comments