~ubuntu-branches/ubuntu/karmic/asterisk/karmic

« back to all changes in this revision

Viewing changes to debian/patches/bristuff/ast-send-message

  • Committer: Bazaar Package Importer
  • Author(s): Faidon Liambotis, Tzafrir Cohen, Faidon Liambotis
  • Date: 2007-12-06 17:20:21 UTC
  • mfrom: (1.1.19 upstream)
  • Revision ID: james.westby@ubuntu.com-20071206172021-pd0wrjirz3os7hia
Tags: 1:1.4.15~dfsg-1
* New upstream release (Closes: #452054)
  - Fix a potential corrupt of voicemail.conf on simultaneous PIN updates
    (Closes: #353227)

[ Tzafrir Cohen ]
* Add some sample/reference config files as documentation.
* Provide asterisk-bristuff for upgrading from Etch.
* Move libc-client to not be last, so debian/backports/xorcom.etch would
  still work.

[ Faidon Liambotis ]
* Really enable the libcap/ToS functionality; the previous patch didn't
  enable the functionality, even though the code and the libcap.so
  dependency were there. (Closes: #454342)
* Fix a minor issue with init script's stop target when running with
  safe_asterisk.
* Add chan_vpb, adding support for VoiceTronix OpenSwitch and OpenLine
  cards. (Closes: #396499)
* Fix debian/watch by using a pkg-voip wrapper to avoid upstream's silly
  redirections. (Closes: #449706)
* Use DEBVERSION as asterisk's version string.
* Disable the MD5 build sum that breaks all out-of-tree plugins (duh!).
* Create /usr/local/share/asterisk/sounds to put all site-specific
  non-modifiable sounds.
* Add a note about bugs.debian.org to the banner.
* Add noload for res_config_* since loading them results in errors and
  doesn't provide any functionality.
* News entries were added but we never shipped the file; ship NEWS.Debian.
* Add an entry to NEWS.Debian warning users about app_voicemail_*.so
  (Closes: #452596)
* Provide options in /etc/default/asterisk for configuring safe_asterisk.
  (Closes: #381786)

[ Tzafrir Cohen ]
* Provide a custom sounds directory under /var/lib - user-modifieble at
  runtime and hence not under /usr. (Closes: #337209)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
Change the API of ast_sendtext and chan->sendtext to add dest and ispdu
2
2
parameters, used by ast_send_message which is also introduced by this patch.
3
3
 
4
 
--- asterisk-1.4.10.1~dfsg.orig/include/asterisk/channel.h
5
 
+++ asterisk-1.4.10.1~dfsg/include/asterisk/channel.h
6
 
@@ -223,7 +223,7 @@ struct ast_channel_tech {
 
4
--- a/include/asterisk/channel.h
 
5
+++ b/include/asterisk/channel.h
 
6
@@ -224,7 +224,7 @@ struct ast_channel_tech {
7
7
        int (* const write)(struct ast_channel *chan, struct ast_frame *frame);
8
8
 
9
9
        /*! \brief Display or transmit text */
12
12
 
13
13
        /*! \brief Display or send an image */
14
14
        int (* const send_image)(struct ast_channel *chan, struct ast_frame *frame);
15
 
@@ -653,6 +653,16 @@ struct ast_channel *ast_request_and_dial
 
15
@@ -663,6 +663,16 @@ struct ast_channel *ast_request_and_dial
16
16
 
17
17
 struct ast_channel *__ast_request_and_dial(const char *type, int format, void *data, int timeout, int *reason, const char *cidnum, const char *cidname, struct outgoing_helper *oh);
18
18
 
29
29
 /*!\brief Register a channel technology (a new channel driver)
30
30
  * Called by a channel module to register the kind of channels it supports.
31
31
  * \param tech Structure defining channel technology or "type"
32
 
@@ -869,10 +879,12 @@ int ast_set_write_format(struct ast_chan
 
32
@@ -879,10 +889,12 @@ int ast_set_write_format(struct ast_chan
33
33
 /*! \brief Sends text to a channel 
34
34
  * Write text to a display on a channel
35
35
  * \param chan channel to act upon
43
43
 
44
44
 /*! \brief Receives a text character from a channel
45
45
  * \param chan channel to act upon
46
 
--- asterisk-1.4.10.1~dfsg.orig/main/channel.c
47
 
+++ asterisk-1.4.10.1~dfsg/main/channel.c
48
 
@@ -2655,7 +2655,7 @@ char *ast_recvtext(struct ast_channel *c
 
46
--- a/main/channel.c
 
47
+++ b/main/channel.c
 
48
@@ -2666,7 +2666,7 @@ char *ast_recvtext(struct ast_channel *c
49
49
        return buf;
50
50
 }
51
51
 
54
54
 {
55
55
        int res = 0;
56
56
        /* Stop if we're a zombie or need a soft hangup */
57
 
@@ -2663,7 +2663,7 @@ int ast_sendtext(struct ast_channel *cha
 
57
@@ -2674,7 +2674,7 @@ int ast_sendtext(struct ast_channel *cha
58
58
                return -1;
59
59
        CHECK_BLOCKING(chan);
60
60
        if (chan->tech->send_text)
63
63
        ast_clear_flag(chan, AST_FLAG_BLOCKING);
64
64
        return res;
65
65
 }
66
 
@@ -2832,7 +2832,7 @@ int ast_write(struct ast_channel *chan, 
 
66
@@ -2843,7 +2843,7 @@ int ast_write(struct ast_channel *chan, 
67
67
                break;
68
68
        case AST_FRAME_TEXT:
69
69
                res = (chan->tech->send_text == NULL) ? 0 :
72
72
                break;
73
73
        case AST_FRAME_HTML:
74
74
                res = (chan->tech->send_html == NULL) ? 0 :
75
 
@@ -4807,6 +4807,25 @@ void ast_channel_stop_silence_generator(
 
75
@@ -4874,6 +4874,25 @@ void ast_channel_stop_silence_generator(
76
76
 }
77
77
 
78
78
 
98
98
 /*! \ brief Convert channel reloadreason (ENUM) to text string for manager event */
99
99
 const char *channelreloadreason2txt(enum channelreloadreason reason)
100
100
 {
101
 
--- asterisk-1.4.10.1~dfsg.orig/apps/app_sendtext.c
102
 
+++ asterisk-1.4.10.1~dfsg/apps/app_sendtext.c
 
101
--- a/apps/app_sendtext.c
 
102
+++ b/apps/app_sendtext.c
103
103
@@ -103,7 +103,7 @@ static int sendtext_exec(struct ast_chan
104
104
        }
105
105
        status = "FAILURE";
109
109
        if (!res)
110
110
                status = "SUCCESS";
111
111
        pbx_builtin_setvar_helper(chan, "SENDTEXTSTATUS", status);
112
 
--- asterisk-1.4.10.1~dfsg.orig/res/res_agi.c
113
 
+++ asterisk-1.4.10.1~dfsg/res/res_agi.c
114
 
@@ -483,7 +483,7 @@ static int handle_sendtext(struct ast_ch
 
112
--- a/res/res_agi.c
 
113
+++ b/res/res_agi.c
 
114
@@ -486,7 +486,7 @@ static int handle_sendtext(struct ast_ch
115
115
           would probably be to strip off the trailing newline before
116
116
           parsing, then here, add a newline at the end of the string
117
117
           before sending it to ast_sendtext --DUDE */
120
120
        fdprintf(agi->fd, "200 result=%d\n", res);
121
121
        return (res >= 0) ? RESULT_SUCCESS : RESULT_FAILURE;
122
122
 }
123
 
--- asterisk-1.4.10.1~dfsg.orig/channels/chan_agent.c
124
 
+++ asterisk-1.4.10.1~dfsg/channels/chan_agent.c
 
123
--- a/channels/chan_agent.c
 
124
+++ b/channels/chan_agent.c
125
125
@@ -246,7 +246,7 @@ static int agent_answer(struct ast_chann
126
126
 static struct ast_frame *agent_read(struct ast_channel *ast);
127
127
 static int agent_write(struct ast_channel *ast, struct ast_frame *f);
131
131
 static int agent_indicate(struct ast_channel *ast, int condition, const void *data, size_t datalen);
132
132
 static int agent_fixup(struct ast_channel *oldchan, struct ast_channel *newchan);
133
133
 static struct ast_channel *agent_bridgedchannel(struct ast_channel *chan, struct ast_channel *bridge);
134
 
@@ -545,13 +545,13 @@ static int agent_sendhtml(struct ast_cha
 
134
@@ -555,13 +555,13 @@ static int agent_sendhtml(struct ast_cha
135
135
        return res;
136
136
 }
137
137
 
147
147
        ast_mutex_unlock(&p->lock);
148
148
        return res;
149
149
 }
150
 
--- asterisk-1.4.10.1~dfsg.orig/channels/chan_alsa.c
151
 
+++ asterisk-1.4.10.1~dfsg/channels/chan_alsa.c
 
150
--- a/channels/chan_alsa.c
 
151
+++ b/channels/chan_alsa.c
152
152
@@ -186,7 +186,7 @@ static int nosound = 0;
153
153
 /* ZZ */
154
154
 static struct ast_channel *alsa_request(const char *type, int format, void *data, int *cause);
158
158
 static int alsa_hangup(struct ast_channel *c);
159
159
 static int alsa_answer(struct ast_channel *c);
160
160
 static struct ast_frame *alsa_read(struct ast_channel *chan);
161
 
@@ -494,7 +494,7 @@ static int alsa_digit(struct ast_channel
 
161
@@ -496,7 +496,7 @@ static int alsa_digit(struct ast_channel
162
162
        return 0;
163
163
 }
164
164
 
167
167
 {
168
168
        ast_mutex_lock(&alsalock);
169
169
        ast_verbose(" << Console Received text %s >> \n", text);
170
 
--- asterisk-1.4.10.1~dfsg.orig/channels/chan_local.c
171
 
+++ asterisk-1.4.10.1~dfsg/channels/chan_local.c
 
170
--- a/channels/chan_local.c
 
171
+++ b/channels/chan_local.c
172
172
@@ -77,7 +77,7 @@ static int local_write(struct ast_channe
173
173
 static int local_indicate(struct ast_channel *ast, int condition, const void *data, size_t datalen);
174
174
 static int local_fixup(struct ast_channel *oldchan, struct ast_channel *newchan);
187
187
 {
188
188
        struct local_pvt *p = ast->tech_pvt;
189
189
        int res = -1;
190
 
--- asterisk-1.4.10.1~dfsg.orig/channels/chan_oss.c
191
 
+++ asterisk-1.4.10.1~dfsg/channels/chan_oss.c
 
190
--- a/channels/chan_oss.c
 
191
+++ b/channels/chan_oss.c
192
192
@@ -405,7 +405,7 @@ static struct ast_channel *oss_request(c
193
193
 , int *cause);
194
194
 static int oss_digit_begin(struct ast_channel *c, char digit);
207
207
 {
208
208
        /* print received messages */
209
209
        ast_verbose(" << Console Received text %s >> \n", text);
210
 
--- asterisk-1.4.10.1~dfsg.orig/channels/chan_phone.c
211
 
+++ asterisk-1.4.10.1~dfsg/channels/chan_phone.c
 
210
--- a/channels/chan_phone.c
 
211
+++ b/channels/chan_phone.c
212
212
@@ -166,7 +166,7 @@ static int phone_answer(struct ast_chann
213
213
 static struct ast_frame *phone_read(struct ast_channel *ast);
214
214
 static int phone_write(struct ast_channel *ast, struct ast_frame *frame);
227
227
 {
228
228
     int length = strlen(text);
229
229
     return phone_write_buf(ast->tech_pvt, text, length, length, 0) == 
230
 
--- asterisk-1.4.10.1~dfsg.orig/channels/chan_sip.c
231
 
+++ asterisk-1.4.10.1~dfsg/channels/chan_sip.c
232
 
@@ -1204,7 +1204,7 @@ static struct ast_config *notify_types;   
 
230
--- a/channels/chan_sip.c
 
231
+++ b/channels/chan_sip.c
 
232
@@ -1209,7 +1209,7 @@ static struct ast_config *notify_types;   
233
233
 /*--- PBX interface functions */
234
234
 static struct ast_channel *sip_request_call(const char *type, int format, void *data, int *cause);
235
235
 static int sip_devicestate(void *data);
238
238
 static int sip_call(struct ast_channel *ast, char *dest, int timeout);
239
239
 static int sip_hangup(struct ast_channel *ast);
240
240
 static int sip_answer(struct ast_channel *ast);
241
 
@@ -2316,7 +2316,7 @@ static char *get_in_brackets(char *tmp)
 
241
@@ -2342,7 +2342,7 @@ static char *get_in_brackets(char *tmp)
242
242
 
243
243
 /*! \brief Send SIP MESSAGE text within a call
244
244
        Called from PBX core sendtext() application */
247
247
 {
248
248
        struct sip_pvt *p = ast->tech_pvt;
249
249
        int debug = sip_debug_test_pvt(p);
250
 
--- asterisk-1.4.10.1~dfsg.orig/channels/chan_iax2.c
251
 
+++ asterisk-1.4.10.1~dfsg/channels/chan_iax2.c
252
 
@@ -817,7 +817,7 @@ static int iax2_provision(struct sockadd
 
250
--- a/channels/chan_iax2.c
 
251
+++ b/channels/chan_iax2.c
 
252
@@ -830,7 +830,7 @@ static int iax2_provision(struct sockadd
253
253
 static int iax2_send(struct chan_iax2_pvt *pvt, struct ast_frame *f, unsigned int ts, int seqno, int now, int transfer, int final);
254
254
 static int iax2_sendhtml(struct ast_channel *c, int subclass, const char *data, int datalen);
255
255
 static int iax2_sendimage(struct ast_channel *c, struct ast_frame *img);
258
258
 static int iax2_setoption(struct ast_channel *c, int option, void *data, int datalen);
259
259
 static int iax2_transfer(struct ast_channel *c, const char *dest);
260
260
 static int iax2_write(struct ast_channel *c, struct ast_frame *f);
261
 
@@ -2476,7 +2476,7 @@ static int iax2_digit_end(struct ast_cha
 
261
@@ -2639,7 +2639,7 @@ static int iax2_digit_end(struct ast_cha
262
262
        return send_command_locked(PTR_TO_CALLNO(c->tech_pvt), AST_FRAME_DTMF_END, digit, 0, NULL, 0, -1);
263
263
 }
264
264