Summary:ASTERISK-10375: [patch] Add optional sendtext (like sendurl is now)
Reporter:outtolunc (outtolunc)Labels:
Date Opened:2007-09-23 18:17:49Date Closed:2007-10-15 14:38:45
Versions:Frequency of
Environment:Attachments:( 0) app_dial.c.sendtext.diff
( 1) app_dial.c.sendtext.diff2
( 2) app_dial.c.sendtext.diff3
Description:gives you the ability to sendtext to the 'called' party
(if the channel supports it), just like sendurl does now.

example:  exten => 5,1,Dial(IAX2/outtolunc,,t,,hold his foot still!)


Disclaimer on file.
Comments:By: Jason Parker (jparker) 2007-10-02 14:05:29

Near the bottom, you're replace this line

} else if (f->frametype == AST_FRAME_TEXT && !ast_test_flag64(outgoing, OPT_RINGBACK|OPT_MUSICBACK)) {

with a DIAL_NOFORWARDTEXT..  was that a bug?

By: outtolunc (outtolunc) 2007-10-02 14:55:11

i added DIAL_NOFORWARDTEXT in the same fashion as as the sendurl stuff

when i got to this section

 750         } else if (f->frametype == AST_FRAME_TEXT && !ast_test_flag64(outgoing, OPT_RINGBACK|OPT_MUSICBACK)) {
 751           if (ast_write(in, f))
 752             ast_log(LOG_WARNING, "Unable to send text\n");
 753         } else if (f->frametype == AST_FRAME_HTML && !ast_test_flag64(outgoing, DIAL_NOFORWARDHTML)) {
 754           if (ast_channel_sendhtml(in, f->subclass, f->data, f->datalen) == -1)
 755             ast_log(LOG_WARNING, "Unable to send URL\n");

which the AST_FRAME_TEXT was the only TEXT code in app_dial,
i figured it was a left over paste from a previous mod, and
used sendhtml as a base. (the patch works on mine)

am i missing something obvious in why the OPT_RINGBACK|OPT_MUSICBACK was on

By: Jason Parker (jparker) 2007-10-02 14:57:33

Nope, that was exactly what I figured you were doing.  That's fine.

By: outtolunc (outtolunc) 2007-10-02 15:03:25

speaking of bugs..

+"  Dial(Technology/resource[&Tech2/resource2...][,timeout][,options][,URL],[TEXT]):\n"

that ,[TEXT] should be [,TEXT]

uploaded ..diff2

By: Tilghman Lesher (tilghman) 2007-10-02 15:44:27

From an architectural standpoint, this doesn't make sense.  Why are you sending text to the recipient caller at the same time as you're initiating voice traffic?

By: outtolunc (outtolunc) 2007-10-02 15:52:39

as mentioned in -dev (irc)

this is for a situation where you have agents
and for whatever reason they are not using something
that can pop url/jabber/etc...

this allows you to send a string of text which could
contain name, address, etc to the agent giving them a
heads up about the calling party.

By: outtolunc (outtolunc) 2007-10-04 21:19:56

ok, there isn't much left that can be wrong <G>

By: Russell Bryant (russell) 2007-10-15 14:38:44

Thank you for the patch submission.  However, I don't think this change is really necessary.

1) The number of parameters and options to app_dial is already way out of hand, so I certainly don't want to anything unless we really have to.

2) You can accomplish this exact task already.  Just use the M() option to Dial to run a macro on the called channel.  In the macro, run the SendText() application.