|
|
|
@ -2129,7 +2129,8 @@ static void update_jbsched(struct chan_iax2_pvt *pvt) {
|
|
|
|
|
pvt->jbid = ast_sched_add(sched, when, get_from_jb, (void *)pvt);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int get_from_jb(void *p) {
|
|
|
|
|
static int get_from_jb(void *p)
|
|
|
|
|
{
|
|
|
|
|
/* make sure pvt is valid! */
|
|
|
|
|
struct chan_iax2_pvt *pvt = p;
|
|
|
|
|
struct iax_frame *fr;
|
|
|
|
@ -2533,6 +2534,15 @@ static struct iax2_peer *realtime_peer(const char *peername, struct sockaddr_in
|
|
|
|
|
ast_inet_ntoa(iabuf, sizeof(iabuf), sin->sin_addr);
|
|
|
|
|
sprintf(porta, "%d", ntohs(sin->sin_port));
|
|
|
|
|
var = ast_load_realtime("iaxpeers", "ipaddr", iabuf, "port", porta, NULL);
|
|
|
|
|
if (var) {
|
|
|
|
|
/* We'll need the peer name in order to build the structure! */
|
|
|
|
|
tmp = var;
|
|
|
|
|
while(tmp) {
|
|
|
|
|
if (!strcasecmp(tmp->name, "name"))
|
|
|
|
|
peername = tmp->value;
|
|
|
|
|
tmp = tmp->next;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!var)
|
|
|
|
|
return NULL;
|
|
|
|
|