|
|
@ -980,6 +980,15 @@ static const struct ast_channel_tech sip_tech = {
|
|
|
|
.send_text = sip_sendtext,
|
|
|
|
.send_text = sip_sendtext,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __AST_DEBUG_MALLOC
|
|
|
|
|
|
|
|
static void FREE(void *ptr)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
free(ptr);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
#define FREE free
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
/*!
|
|
|
|
\brief Thread-safe random number generator
|
|
|
|
\brief Thread-safe random number generator
|
|
|
|
\return a random number
|
|
|
|
\return a random number
|
|
|
@ -1652,7 +1661,7 @@ static void register_peer_exten(struct sip_peer *peer, int onoff)
|
|
|
|
stringp = multi;
|
|
|
|
stringp = multi;
|
|
|
|
while((ext = strsep(&stringp, "&"))) {
|
|
|
|
while((ext = strsep(&stringp, "&"))) {
|
|
|
|
if (onoff)
|
|
|
|
if (onoff)
|
|
|
|
ast_add_extension(regcontext, 1, ext, 1, NULL, NULL, "Noop", strdup(peer->name), free, channeltype);
|
|
|
|
ast_add_extension(regcontext, 1, ext, 1, NULL, NULL, "Noop", strdup(peer->name), FREE, channeltype);
|
|
|
|
else
|
|
|
|
else
|
|
|
|
ast_context_remove_extension(regcontext, ext, 1, NULL);
|
|
|
|
ast_context_remove_extension(regcontext, ext, 1, NULL);
|
|
|
|
}
|
|
|
|
}
|
|
|
|