158
158
<argument name="progress" />
159
159
<argument name="mfprogress" />
160
160
<argument name="mfwink" />
161
+ <argument name="sfprogress" />
162
+ <argument name="sfwink" />
161
163
<para>Send the specified DTMF strings <emphasis>after</emphasis> the called
162
164
party has answered, but before the call gets bridged. The
163
165
<replaceable>called</replaceable> DTMF string is sent to the called party, and the
170
172
If <replaceable>mfwink</replaceable> is specified, its MF is sent
171
173
to the called party immediately after receiving a <literal>WINK</literal> message.</para>
172
174
<para>See <literal>SendMF</literal> for valid digits.</para>
175
+ <para>If <replaceable>sfprogress</replaceable> is specified, its SF is sent
176
+ to the called party immediately after receiving a <literal>PROGRESS</literal> message.
177
+ If <replaceable>sfwink</replaceable> is specified, its SF is sent
178
+ to the called party immediately after receiving a <literal>WINK</literal> message.</para>
179
+ <para>See <literal>SendSF</literal> for valid digits.</para>
173
180
</option>
174
181
<option name="E">
175
182
<para>Enable echoing of sent MF or SF digits back to caller (e.g. "hearpulsing").
@@ -1214,6 +1221,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
1214
1221
struct privacy_args * pa ,
1215
1222
const struct cause_args * num_in , int * result , char * dtmf_progress ,
1216
1223
char * mf_progress , char * mf_wink ,
1224
+ char * sf_progress , char * sf_wink ,
1217
1225
const int hearpulsing ,
1218
1226
const int ignore_cc ,
1219
1227
struct ast_party_id * forced_clid , struct ast_party_id * stored_clid ,
@@ -1580,6 +1588,14 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
1580
1588
ast_mf_stream (c , (hearpulsing ? NULL : in ),
1581
1589
(hearpulsing ? in : NULL ), mf_progress , 50 , 55 , 120 , 65 , 0 );
1582
1590
}
1591
+ if (!ast_strlen_zero (sf_progress )) {
1592
+ ast_verb (3 ,
1593
+ "Sending SF '%s' to %s as result of "
1594
+ "receiving a PROGRESS message.\n" ,
1595
+ sf_progress , (hearpulsing ? "parties" : "called party" ));
1596
+ ast_sf_stream (c , (hearpulsing ? NULL : in ),
1597
+ (hearpulsing ? in : NULL ), sf_progress , 0 , 0 );
1598
+ }
1583
1599
if (!ast_strlen_zero (dtmf_progress )) {
1584
1600
ast_verb (3 ,
1585
1601
"Sending DTMF '%s' to the called party as result of "
@@ -1602,7 +1618,16 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
1602
1618
ast_mf_stream (c , (hearpulsing ? NULL : in ),
1603
1619
(hearpulsing ? in : NULL ), mf_wink , 50 , 55 , 120 , 65 , 0 );
1604
1620
}
1621
+ if (!ast_strlen_zero (sf_wink )) {
1622
+ ast_verb (3 ,
1623
+ "Sending SF '%s' to %s as result of "
1624
+ "receiving a WINK message.\n" ,
1625
+ sf_wink , (hearpulsing ? "parties" : "called party" ));
1626
+ ast_sf_stream (c , (hearpulsing ? NULL : in ),
1627
+ (hearpulsing ? in : NULL ), sf_wink , 0 , 0 );
1628
+ }
1605
1629
}
1630
+ ast_indicate (in , AST_CONTROL_WINK );
1606
1631
break ;
1607
1632
case AST_CONTROL_VIDUPDATE :
1608
1633
case AST_CONTROL_SRCUPDATE :
@@ -2278,6 +2303,7 @@ static int dial_exec_full(struct ast_channel *chan, const char *data, struct ast
2278
2303
struct timeval calldurationlimit = { 0 , };
2279
2304
char * dtmfcalled = NULL , * dtmfcalling = NULL , * dtmf_progress = NULL ;
2280
2305
char * mf_progress = NULL , * mf_wink = NULL ;
2306
+ char * sf_progress = NULL , * sf_wink = NULL ;
2281
2307
struct privacy_args pa = {
2282
2308
.sentringing = 0 ,
2283
2309
.privdb_val = 0 ,
@@ -2413,11 +2439,13 @@ static int dial_exec_full(struct ast_channel *chan, const char *data, struct ast
2413
2439
}
2414
2440
2415
2441
if (ast_test_flag64 (& opts , OPT_SENDDTMF ) && !ast_strlen_zero (opt_args [OPT_ARG_SENDDTMF ])) {
2416
- mf_wink = opt_args [OPT_ARG_SENDDTMF ];
2417
- dtmfcalled = strsep (& mf_wink , ":" );
2418
- dtmfcalling = strsep (& mf_wink , ":" );
2419
- dtmf_progress = strsep (& mf_wink , ":" );
2420
- mf_progress = strsep (& mf_wink , ":" );
2442
+ sf_wink = opt_args [OPT_ARG_SENDDTMF ];
2443
+ dtmfcalled = strsep (& sf_wink , ":" );
2444
+ dtmfcalling = strsep (& sf_wink , ":" );
2445
+ dtmf_progress = strsep (& sf_wink , ":" );
2446
+ mf_progress = strsep (& sf_wink , ":" );
2447
+ mf_wink = strsep (& sf_wink , ":" );
2448
+ sf_progress = strsep (& sf_wink , ":" );
2421
2449
}
2422
2450
2423
2451
if (ast_test_flag64 (& opts , OPT_DURATION_LIMIT ) && !ast_strlen_zero (opt_args [OPT_ARG_DURATION_LIMIT ])) {
@@ -2894,7 +2922,8 @@ static int dial_exec_full(struct ast_channel *chan, const char *data, struct ast
2894
2922
}
2895
2923
2896
2924
peer = wait_for_answer (chan , & out_chans , & to , peerflags , opt_args , & pa , & num , & result ,
2897
- dtmf_progress , mf_progress , mf_wink , (ast_test_flag64 (& opts , OPT_HEARPULSING ) ? 1 : 0 ),
2925
+ dtmf_progress , mf_progress , mf_wink , sf_progress , sf_wink ,
2926
+ (ast_test_flag64 (& opts , OPT_HEARPULSING ) ? 1 : 0 ),
2898
2927
ignore_cc , & forced_clid , & stored_clid , & config );
2899
2928
2900
2929
if (!peer ) {
0 commit comments