75{
76 char *parse;
78 const char *chanName;
79 int res;
80
84 );
85
86 int s = 0;
87 uuid_t uu;
88
89
91
92
97 return -1;
98 }
99 if (uuid_parse(
args.idStr, uu)) {
101 return -1;
102 }
104
105 return -1;
106 }
107
110
112 ast_log(
LOG_ERROR,
"Failed to set write format to SLINEAR for channel %s\n", chanName);
115 close(s);
116 return -1;
117 }
119 ast_log(
LOG_ERROR,
"Failed to set read format to SLINEAR for channel %s\n", chanName);
120
121
122
123
125 ast_log(
LOG_ERROR,
"Failed to restore write format for channel %s\n", chanName);
126 }
129 close(s);
130 return -1;
131 }
132
134
135 if (res) {
136
138 ast_log(
LOG_ERROR,
"Failed to restore write format for channel %s\n", chanName);
139 }
141 ast_log(
LOG_ERROR,
"Failed to restore read format for channel %s\n", chanName);
142 }
145 close(s);
146 return res;
147 }
148 close(s);
149
151 ast_log(
LOG_ERROR,
"Failed to restore write format for channel %s\n", chanName);
152 }
154 ast_log(
LOG_ERROR,
"Failed to restore read format for channel %s\n", chanName);
155 }
158
159 return 0;
160}
static int audiosocket_run(struct ast_channel *chan, const char *id, const int svc)
#define ast_strdupa(s)
duplicate a string in memory from the stack
#define ao2_ref(o, delta)
Reference/unreference an object and return the old refcount.
#define ao2_bump(obj)
Bump refcount on an AO2 object by one, returning the object.
const char * ast_channel_name(const struct ast_channel *chan)
int ast_set_read_format(struct ast_channel *chan, struct ast_format *format)
Sets read format on channel chan.
struct ast_format * ast_channel_writeformat(struct ast_channel *chan)
int ast_set_write_format(struct ast_channel *chan, struct ast_format *format)
Sets write format on channel chan.
struct ast_format * ast_channel_readformat(struct ast_channel *chan)
#define AST_APP_ARG(name)
Define an application argument.
#define AST_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application's arguments.
#define AST_STANDARD_APP_ARGS(args, parse)
Performs the 'standard' argument separation process for an application.
const int ast_audiosocket_connect(const char *server, struct ast_channel *chan)
Send the initial message to an AudioSocket server.
static force_inline int attribute_pure ast_strlen_zero(const char *s)