00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #include "asterisk.h"
00037
00038 ASTERISK_FILE_VERSION(__FILE__, "$Revision: 146799 $")
00039
00040 #include <stdlib.h>
00041 #include <stdio.h>
00042 #include <sys/types.h>
00043 #include <sys/mman.h>
00044 #include <dirent.h>
00045 #include <sys/socket.h>
00046 #include <netinet/in.h>
00047 #include <arpa/inet.h>
00048 #include <netinet/in_systm.h>
00049 #include <netinet/ip.h>
00050 #include <sys/time.h>
00051 #include <sys/signal.h>
00052 #include <signal.h>
00053 #include <string.h>
00054 #include <strings.h>
00055 #include <errno.h>
00056 #include <unistd.h>
00057 #include <netdb.h>
00058 #include <fcntl.h>
00059 #include <sys/stat.h>
00060 #include <regex.h>
00061
00062 #if defined(HAVE_ZAPTEL) || defined (HAVE_DAHDI)
00063 #include <sys/ioctl.h>
00064 #include "asterisk/dahdi_compat.h"
00065 #endif
00066
00067 #include "asterisk/lock.h"
00068 #include "asterisk/frame.h"
00069 #include "asterisk/channel.h"
00070 #include "asterisk/logger.h"
00071 #include "asterisk/module.h"
00072 #include "asterisk/pbx.h"
00073 #include "asterisk/sched.h"
00074 #include "asterisk/io.h"
00075 #include "asterisk/config.h"
00076 #include "asterisk/options.h"
00077 #include "asterisk/cli.h"
00078 #include "asterisk/translate.h"
00079 #include "asterisk/md5.h"
00080 #include "asterisk/cdr.h"
00081 #include "asterisk/crypto.h"
00082 #include "asterisk/acl.h"
00083 #include "asterisk/manager.h"
00084 #include "asterisk/callerid.h"
00085 #include "asterisk/app.h"
00086 #include "asterisk/astdb.h"
00087 #include "asterisk/musiconhold.h"
00088 #include "asterisk/features.h"
00089 #include "asterisk/utils.h"
00090 #include "asterisk/causes.h"
00091 #include "asterisk/localtime.h"
00092 #include "asterisk/aes.h"
00093 #include "asterisk/dnsmgr.h"
00094 #include "asterisk/devicestate.h"
00095 #include "asterisk/netsock.h"
00096 #include "asterisk/stringfields.h"
00097 #include "asterisk/linkedlists.h"
00098 #include "asterisk/astobj2.h"
00099
00100 #include "iax2.h"
00101 #include "iax2-parser.h"
00102 #include "iax2-provision.h"
00103 #include "jitterbuf.h"
00104
00105
00106
00107 #define SCHED_MULTITHREADED
00108
00109
00110
00111 #define DEBUG_SCHED_MULTITHREAD
00112
00113 #ifndef IPTOS_MINCOST
00114 #define IPTOS_MINCOST 0x02
00115 #endif
00116
00117 #ifdef SO_NO_CHECK
00118 static int nochecksums = 0;
00119 #endif
00120
00121
00122 #define PTR_TO_CALLNO(a) ((unsigned short)(unsigned long)(a))
00123 #define CALLNO_TO_PTR(a) ((void *)(unsigned long)(a))
00124
00125 #define DEFAULT_THREAD_COUNT 10
00126 #define DEFAULT_MAX_THREAD_COUNT 100
00127 #define DEFAULT_RETRY_TIME 1000
00128 #define MEMORY_SIZE 100
00129 #define DEFAULT_DROP 3
00130
00131 #define DEBUG_SUPPORT
00132
00133 #define MIN_REUSE_TIME 60
00134
00135
00136 #define GAMMA (0.01)
00137
00138 static struct ast_codec_pref prefs;
00139
00140 static const char tdesc[] = "Inter Asterisk eXchange Driver (Ver 2)";
00141
00142 static char context[80] = "default";
00143
00144 static char language[MAX_LANGUAGE] = "";
00145 static char regcontext[AST_MAX_CONTEXT] = "";
00146
00147 static int maxauthreq = 3;
00148 static int max_retries = 4;
00149 static int ping_time = 21;
00150 static int lagrq_time = 10;
00151 static int maxjitterbuffer=1000;
00152 static int resyncthreshold=1000;
00153 static int maxjitterinterps=10;
00154 static int trunkfreq = 20;
00155 static int authdebug = 1;
00156 static int autokill = 0;
00157 static int iaxcompat = 0;
00158
00159 static int iaxdefaultdpcache=10 * 60;
00160
00161 static int iaxdefaulttimeout = 5;
00162
00163 static unsigned int tos = 0;
00164
00165 static int min_reg_expire;
00166 static int max_reg_expire;
00167
00168 static int timingfd = -1;
00169
00170 static struct ast_netsock_list *netsock;
00171 static struct ast_netsock_list *outsock;
00172 static int defaultsockfd = -1;
00173
00174 int (*iax2_regfunk)(const char *username, int onoff) = NULL;
00175
00176
00177 #define IAX_CAPABILITY_FULLBANDWIDTH 0xFFFF
00178
00179 #define IAX_CAPABILITY_MEDBANDWIDTH (IAX_CAPABILITY_FULLBANDWIDTH & \
00180 ~AST_FORMAT_SLINEAR & \
00181 ~AST_FORMAT_ULAW & \
00182 ~AST_FORMAT_ALAW & \
00183 ~AST_FORMAT_G722)
00184
00185 #define IAX_CAPABILITY_LOWBANDWIDTH (IAX_CAPABILITY_MEDBANDWIDTH & \
00186 ~AST_FORMAT_G726 & \
00187 ~AST_FORMAT_G726_AAL2 & \
00188 ~AST_FORMAT_ADPCM)
00189
00190 #define IAX_CAPABILITY_LOWFREE (IAX_CAPABILITY_LOWBANDWIDTH & \
00191 ~AST_FORMAT_G723_1)
00192
00193
00194 #define DEFAULT_MAXMS 2000
00195 #define DEFAULT_FREQ_OK 60 * 1000
00196 #define DEFAULT_FREQ_NOTOK 10 * 1000
00197
00198 static struct io_context *io;
00199 static struct sched_context *sched;
00200
00201 static int iax2_capability = IAX_CAPABILITY_FULLBANDWIDTH;
00202
00203 static int iaxdebug = 0;
00204
00205 static int iaxtrunkdebug = 0;
00206
00207 static int test_losspct = 0;
00208 #ifdef IAXTESTS
00209 static int test_late = 0;
00210 static int test_resync = 0;
00211 static int test_jit = 0;
00212 static int test_jitpct = 0;
00213 #endif
00214
00215 static char accountcode[AST_MAX_ACCOUNT_CODE];
00216 static char mohinterpret[MAX_MUSICCLASS];
00217 static char mohsuggest[MAX_MUSICCLASS];
00218 static int amaflags = 0;
00219 static int adsi = 0;
00220 static int delayreject = 0;
00221 static int iax2_encryption = 0;
00222
00223 static struct ast_flags globalflags = { 0 };
00224
00225 static pthread_t netthreadid = AST_PTHREADT_NULL;
00226 static pthread_t schedthreadid = AST_PTHREADT_NULL;
00227 AST_MUTEX_DEFINE_STATIC(sched_lock);
00228 static ast_cond_t sched_cond;
00229
00230 enum {
00231 IAX_STATE_STARTED = (1 << 0),
00232 IAX_STATE_AUTHENTICATED = (1 << 1),
00233 IAX_STATE_TBD = (1 << 2),
00234 IAX_STATE_UNCHANGED = (1 << 3),
00235 } iax2_state;
00236
00237 struct iax2_context {
00238 char context[AST_MAX_CONTEXT];
00239 struct iax2_context *next;
00240 };
00241
00242 enum {
00243 IAX_HASCALLERID = (1 << 0),
00244 IAX_DELME = (1 << 1),
00245 IAX_TEMPONLY = (1 << 2),
00246 IAX_TRUNK = (1 << 3),
00247 IAX_NOTRANSFER = (1 << 4),
00248 IAX_USEJITTERBUF = (1 << 5),
00249 IAX_DYNAMIC = (1 << 6),
00250 IAX_SENDANI = (1 << 7),
00251
00252 IAX_ALREADYGONE = (1 << 9),
00253 IAX_PROVISION = (1 << 10),
00254 IAX_QUELCH = (1 << 11),
00255 IAX_ENCRYPTED = (1 << 12),
00256 IAX_KEYPOPULATED = (1 << 13),
00257 IAX_CODEC_USER_FIRST = (1 << 14),
00258 IAX_CODEC_NOPREFS = (1 << 15),
00259 IAX_CODEC_NOCAP = (1 << 16),
00260 IAX_RTCACHEFRIENDS = (1 << 17),
00261 IAX_RTUPDATE = (1 << 18),
00262 IAX_RTAUTOCLEAR = (1 << 19),
00263 IAX_FORCEJITTERBUF = (1 << 20),
00264 IAX_RTIGNOREREGEXPIRE = (1 << 21),
00265 IAX_TRUNKTIMESTAMPS = (1 << 22),
00266 IAX_TRANSFERMEDIA = (1 << 23),
00267 IAX_MAXAUTHREQ = (1 << 24),
00268 IAX_DELAYPBXSTART = (1 << 25),
00269
00270
00271 IAX_ALLOWFWDOWNLOAD = (1 << 26),
00272 } iax2_flags;
00273
00274 static int global_rtautoclear = 120;
00275
00276 static int reload_config(void);
00277 static int iax2_reload(int fd, int argc, char *argv[]);
00278
00279
00280 struct iax2_user {
00281 AST_DECLARE_STRING_FIELDS(
00282 AST_STRING_FIELD(name);
00283 AST_STRING_FIELD(secret);
00284 AST_STRING_FIELD(dbsecret);
00285 AST_STRING_FIELD(accountcode);
00286 AST_STRING_FIELD(mohinterpret);
00287 AST_STRING_FIELD(mohsuggest);
00288 AST_STRING_FIELD(inkeys);
00289 AST_STRING_FIELD(language);
00290 AST_STRING_FIELD(cid_num);
00291 AST_STRING_FIELD(cid_name);
00292 );
00293
00294 int authmethods;
00295 int encmethods;
00296 int amaflags;
00297 int adsi;
00298 unsigned int flags;
00299 int capability;
00300 int maxauthreq;
00301 int curauthreq;
00302 struct ast_codec_pref prefs;
00303 struct ast_ha *ha;
00304 struct iax2_context *contexts;
00305 struct ast_variable *vars;
00306 };
00307
00308 struct iax2_peer {
00309 AST_DECLARE_STRING_FIELDS(
00310 AST_STRING_FIELD(name);
00311 AST_STRING_FIELD(username);
00312 AST_STRING_FIELD(secret);
00313 AST_STRING_FIELD(dbsecret);
00314 AST_STRING_FIELD(outkey);
00315
00316 AST_STRING_FIELD(regexten);
00317 AST_STRING_FIELD(context);
00318 AST_STRING_FIELD(peercontext);
00319 AST_STRING_FIELD(mailbox);
00320 AST_STRING_FIELD(mohinterpret);
00321 AST_STRING_FIELD(mohsuggest);
00322 AST_STRING_FIELD(inkeys);
00323
00324 AST_STRING_FIELD(cid_num);
00325 AST_STRING_FIELD(cid_name);
00326 AST_STRING_FIELD(zonetag);
00327 );
00328 struct ast_codec_pref prefs;
00329 struct ast_dnsmgr_entry *dnsmgr;
00330 struct sockaddr_in addr;
00331 int formats;
00332 int sockfd;
00333 struct in_addr mask;
00334 int adsi;
00335 unsigned int flags;
00336
00337
00338 struct sockaddr_in defaddr;
00339 int authmethods;
00340 int encmethods;
00341
00342 int expire;
00343 int expiry;
00344 int capability;
00345
00346
00347 int callno;
00348 int pokeexpire;
00349 int lastms;
00350 int maxms;
00351
00352 int pokefreqok;
00353 int pokefreqnotok;
00354 int historicms;
00355 int smoothing;
00356
00357 struct ast_ha *ha;
00358 };
00359
00360 #define IAX2_TRUNK_PREFACE (sizeof(struct iax_frame) + sizeof(struct ast_iax2_meta_hdr) + sizeof(struct ast_iax2_meta_trunk_hdr))
00361
00362 static struct iax2_trunk_peer {
00363 ast_mutex_t lock;
00364 int sockfd;
00365 struct sockaddr_in addr;
00366 struct timeval txtrunktime;
00367 struct timeval rxtrunktime;
00368 struct timeval lasttxtime;
00369 struct timeval trunkact;
00370 unsigned int lastsent;
00371
00372 unsigned char *trunkdata;
00373 unsigned int trunkdatalen;
00374 unsigned int trunkdataalloc;
00375 struct iax2_trunk_peer *next;
00376 int trunkerror;
00377 int calls;
00378 } *tpeers = NULL;
00379
00380 AST_MUTEX_DEFINE_STATIC(tpeerlock);
00381
00382 struct iax_firmware {
00383 struct iax_firmware *next;
00384 int fd;
00385 int mmaplen;
00386 int dead;
00387 struct ast_iax2_firmware_header *fwh;
00388 unsigned char *buf;
00389 };
00390
00391 enum iax_reg_state {
00392 REG_STATE_UNREGISTERED = 0,
00393 REG_STATE_REGSENT,
00394 REG_STATE_AUTHSENT,
00395 REG_STATE_REGISTERED,
00396 REG_STATE_REJECTED,
00397 REG_STATE_TIMEOUT,
00398 REG_STATE_NOAUTH
00399 };
00400
00401 enum iax_transfer_state {
00402 TRANSFER_NONE = 0,
00403 TRANSFER_BEGIN,
00404 TRANSFER_READY,
00405 TRANSFER_RELEASED,
00406 TRANSFER_PASSTHROUGH,
00407 TRANSFER_MBEGIN,
00408 TRANSFER_MREADY,
00409 TRANSFER_MRELEASED,
00410 TRANSFER_MPASSTHROUGH,
00411 TRANSFER_MEDIA,
00412 TRANSFER_MEDIAPASS
00413 };
00414
00415 struct iax2_registry {
00416 struct sockaddr_in addr;
00417 char username[80];
00418 char secret[80];
00419 char random[80];
00420 int expire;
00421 int refresh;
00422 enum iax_reg_state regstate;
00423 int messages;
00424 int callno;
00425 struct sockaddr_in us;
00426 struct ast_dnsmgr_entry *dnsmgr;
00427 AST_LIST_ENTRY(iax2_registry) entry;
00428 };
00429
00430 static AST_LIST_HEAD_STATIC(registrations, iax2_registry);
00431
00432
00433 #define MIN_RETRY_TIME 100
00434 #define MAX_RETRY_TIME 10000
00435
00436 #define MAX_JITTER_BUFFER 50
00437 #define MIN_JITTER_BUFFER 10
00438
00439 #define DEFAULT_TRUNKDATA 640 * 10
00440 #define MAX_TRUNKDATA 640 * 200
00441
00442 #define MAX_TIMESTAMP_SKEW 160
00443
00444
00445 #define TS_GAP_FOR_JB_RESYNC 5000
00446
00447 static int iaxthreadcount = DEFAULT_THREAD_COUNT;
00448 static int iaxmaxthreadcount = DEFAULT_MAX_THREAD_COUNT;
00449 static int iaxdynamicthreadcount = 0;
00450 static int iaxdynamicthreadnum = 0;
00451 static int iaxactivethreadcount = 0;
00452
00453 struct iax_rr {
00454 int jitter;
00455 int losspct;
00456 int losscnt;
00457 int packets;
00458 int delay;
00459 int dropped;
00460 int ooo;
00461 };
00462
00463 struct chan_iax2_pvt {
00464
00465 int sockfd;
00466
00467 int voiceformat;
00468
00469 int videoformat;
00470
00471 int svoiceformat;
00472
00473 int svideoformat;
00474
00475 int capability;
00476
00477 unsigned int last;
00478
00479 unsigned int lastsent;
00480
00481 unsigned int lastvsent;
00482
00483 unsigned int nextpred;
00484
00485 int notsilenttx;
00486
00487 unsigned int pingtime;
00488
00489 int maxtime;
00490
00491 struct sockaddr_in addr;
00492
00493 struct ast_codec_pref prefs;
00494
00495 struct ast_codec_pref rprefs;
00496
00497 unsigned short callno;
00498
00499 unsigned short peercallno;
00500
00501
00502
00503 int chosenformat;
00504
00505 int peerformat;
00506
00507 int peercapability;
00508
00509 struct timeval offset;
00510
00511 struct timeval rxcore;
00512
00513 jitterbuf *jb;
00514
00515 int jbid;
00516
00517 int lag;
00518
00519 int error;
00520
00521 struct ast_channel *owner;
00522
00523 struct ast_flags state;
00524
00525 int expiry;
00526
00527 unsigned char oseqno;
00528
00529 unsigned char rseqno;
00530
00531 unsigned char iseqno;
00532
00533 unsigned char aseqno;
00534
00535 AST_DECLARE_STRING_FIELDS(
00536
00537 AST_STRING_FIELD(peer);
00538
00539 AST_STRING_FIELD(context);
00540
00541 AST_STRING_FIELD(cid_num);
00542 AST_STRING_FIELD(cid_name);
00543
00544 AST_STRING_FIELD(ani);
00545
00546 AST_STRING_FIELD(dnid);
00547
00548 AST_STRING_FIELD(rdnis);
00549
00550 AST_STRING_FIELD(exten);
00551
00552 AST_STRING_FIELD(username);
00553
00554 AST_STRING_FIELD(secret);
00555
00556 AST_STRING_FIELD(challenge);
00557
00558 AST_STRING_FIELD(inkeys);
00559
00560 AST_STRING_FIELD(outkey);
00561
00562 AST_STRING_FIELD(language);
00563
00564 AST_STRING_FIELD(host);
00565
00566 AST_STRING_FIELD(dproot);
00567 AST_STRING_FIELD(accountcode);
00568 AST_STRING_FIELD(mohinterpret);
00569 AST_STRING_FIELD(mohsuggest);
00570 );
00571
00572
00573 int authmethods;
00574
00575 int encmethods;
00576
00577 aes_encrypt_ctx ecx;
00578
00579 aes_decrypt_ctx dcx;
00580
00581 unsigned char semirand[32];
00582
00583 struct iax2_registry *reg;
00584
00585 struct iax2_peer *peerpoke;
00586
00587 unsigned int flags;
00588 int adsi;
00589
00590
00591 enum iax_transfer_state transferring;
00592
00593 int transferid;
00594
00595 struct sockaddr_in transfer;
00596
00597 unsigned short transfercallno;
00598
00599 aes_encrypt_ctx tdcx;
00600
00601
00602 int peeradsicpe;
00603
00604
00605 unsigned short bridgecallno;
00606
00607 int pingid;
00608 int lagid;
00609 int autoid;
00610 int authid;
00611 int authfail;
00612 int initid;
00613 int calling_ton;
00614 int calling_tns;
00615 int calling_pres;
00616 int amaflags;
00617 struct iax2_dpcache *dpentries;
00618 struct ast_variable *vars;
00619
00620 struct iax_rr remote_rr;
00621
00622 int min;
00623
00624 int frames_dropped;
00625
00626 int frames_received;
00627 };
00628
00629 static struct ast_iax2_queue {
00630 AST_LIST_HEAD(, iax_frame) queue;
00631 int count;
00632 } iaxq;
00633
00634
00635
00636
00637
00638
00639
00640
00641 #ifdef LOW_MEMORY
00642 #define MAX_PEER_BUCKETS 1
00643
00644 #else
00645 #define MAX_PEER_BUCKETS 1
00646
00647 #endif
00648 static struct ao2_container *peers;
00649
00650 #define MAX_USER_BUCKETS MAX_PEER_BUCKETS
00651 static struct ao2_container *users;
00652
00653 static struct ast_firmware_list {
00654 struct iax_firmware *wares;
00655 ast_mutex_t lock;
00656 } waresl;
00657
00658
00659 #define CACHE_FLAG_EXISTS (1 << 0)
00660
00661 #define CACHE_FLAG_NONEXISTENT (1 << 1)
00662
00663 #define CACHE_FLAG_CANEXIST (1 << 2)
00664
00665 #define CACHE_FLAG_PENDING (1 << 3)
00666
00667 #define CACHE_FLAG_TIMEOUT (1 << 4)
00668
00669 #define CACHE_FLAG_TRANSMITTED (1 << 5)
00670
00671 #define CACHE_FLAG_UNKNOWN (1 << 6)
00672
00673 #define CACHE_FLAG_MATCHMORE (1 << 7)
00674
00675 static struct iax2_dpcache {
00676 char peercontext[AST_MAX_CONTEXT];
00677 char exten[AST_MAX_EXTENSION];
00678 struct timeval orig;
00679 struct timeval expiry;
00680 int flags;
00681 unsigned short callno;
00682 int waiters[256];
00683 struct iax2_dpcache *next;
00684 struct iax2_dpcache *peer;
00685 } *dpcache;
00686
00687 AST_MUTEX_DEFINE_STATIC(dpcache_lock);
00688
00689 static void reg_source_db(struct iax2_peer *p);
00690 static struct iax2_peer *realtime_peer(const char *peername, struct sockaddr_in *sin);
00691
00692 static int ast_cli_netstats(struct mansession *s, int fd, int limit_fmt);
00693
00694 #define IAX_IOSTATE_IDLE 0
00695 #define IAX_IOSTATE_READY 1
00696 #define IAX_IOSTATE_PROCESSING 2
00697 #define IAX_IOSTATE_SCHEDREADY 3
00698
00699 #define IAX_TYPE_POOL 1
00700 #define IAX_TYPE_DYNAMIC 2
00701
00702 struct iax2_pkt_buf {
00703 AST_LIST_ENTRY(iax2_pkt_buf) entry;
00704 size_t len;
00705 unsigned char buf[1];
00706 };
00707
00708 struct iax2_thread {
00709 AST_LIST_ENTRY(iax2_thread) list;
00710 int type;
00711 int iostate;
00712 #ifdef SCHED_MULTITHREADED
00713 void (*schedfunc)(const void *);
00714 const void *scheddata;
00715 #endif
00716 #ifdef DEBUG_SCHED_MULTITHREAD
00717 char curfunc[80];
00718 #endif
00719 int actions;
00720 pthread_t threadid;
00721 int threadnum;
00722 struct sockaddr_in iosin;
00723 unsigned char readbuf[4096];
00724 unsigned char *buf;
00725 ssize_t buf_len;
00726 size_t buf_size;
00727 int iofd;
00728 time_t checktime;
00729 ast_mutex_t lock;
00730 ast_cond_t cond;
00731 unsigned int ready_for_signal:1;
00732
00733
00734
00735
00736 struct {
00737 unsigned short callno;
00738 struct sockaddr_in sin;
00739 unsigned char type;
00740 unsigned char csub;
00741 } ffinfo;
00742
00743
00744
00745 AST_LIST_HEAD_NOLOCK(, iax2_pkt_buf) full_frames;
00746 };
00747
00748
00749 static AST_LIST_HEAD_STATIC(idle_list, iax2_thread);
00750 static AST_LIST_HEAD_STATIC(active_list, iax2_thread);
00751 static AST_LIST_HEAD_STATIC(dynamic_list, iax2_thread);
00752
00753 static void *iax2_process_thread(void *data);
00754
00755 static void signal_condition(ast_mutex_t *lock, ast_cond_t *cond)
00756 {
00757 ast_mutex_lock(lock);
00758 ast_cond_signal(cond);
00759 ast_mutex_unlock(lock);
00760 }
00761
00762 static void iax_debug_output(const char *data)
00763 {
00764 if (iaxdebug)
00765 ast_verbose("%s", data);
00766 }
00767
00768 static void iax_error_output(const char *data)
00769 {
00770 ast_log(LOG_WARNING, "%s", data);
00771 }
00772
00773 static void jb_error_output(const char *fmt, ...)
00774 {
00775 va_list args;
00776 char buf[1024];
00777
00778 va_start(args, fmt);
00779 vsnprintf(buf, 1024, fmt, args);
00780 va_end(args);
00781
00782 ast_log(LOG_ERROR, buf);
00783 }
00784
00785 static void jb_warning_output(const char *fmt, ...)
00786 {
00787 va_list args;
00788 char buf[1024];
00789
00790 va_start(args, fmt);
00791 vsnprintf(buf, 1024, fmt, args);
00792 va_end(args);
00793
00794 ast_log(LOG_WARNING, buf);
00795 }
00796
00797 static void jb_debug_output(const char *fmt, ...)
00798 {
00799 va_list args;
00800 char buf[1024];
00801
00802 va_start(args, fmt);
00803 vsnprintf(buf, 1024, fmt, args);
00804 va_end(args);
00805
00806 ast_verbose(buf);
00807 }
00808
00809
00810 static struct chan_iax2_pvt *iaxs[IAX_MAX_CALLS];
00811 static ast_mutex_t iaxsl[ARRAY_LEN(iaxs)];
00812 static struct timeval lastused[ARRAY_LEN(iaxs)];
00813
00814
00815
00816
00817
00818
00819
00820
00821
00822
00823 static struct ao2_container *iax_peercallno_pvts;
00824
00825