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 #include <stdio.h>
00033 #include <ctype.h>
00034 #include <string.h>
00035 #include <unistd.h>
00036 #include <sys/socket.h>
00037 #include <sys/ioctl.h>
00038 #include <net/if.h>
00039 #include <errno.h>
00040 #include <stdlib.h>
00041 #include <fcntl.h>
00042 #include <netdb.h>
00043 #include <signal.h>
00044 #include <sys/signal.h>
00045 #include <netinet/in.h>
00046 #include <netinet/in_systm.h>
00047 #include <arpa/inet.h>
00048 #include <netinet/ip.h>
00049 #include <regex.h>
00050
00051 #include "asterisk.h"
00052
00053 ASTERISK_FILE_VERSION(__FILE__, "$Revision: 120109 $")
00054
00055 #include "asterisk/lock.h"
00056 #include "asterisk/channel.h"
00057 #include "asterisk/config.h"
00058 #include "asterisk/logger.h"
00059 #include "asterisk/module.h"
00060 #include "asterisk/pbx.h"
00061 #include "asterisk/options.h"
00062 #include "asterisk/lock.h"
00063 #include "asterisk/sched.h"
00064 #include "asterisk/io.h"
00065 #include "asterisk/rtp.h"
00066 #include "asterisk/acl.h"
00067 #include "asterisk/manager.h"
00068 #include "asterisk/callerid.h"
00069 #include "asterisk/cli.h"
00070 #include "asterisk/app.h"
00071 #include "asterisk/musiconhold.h"
00072 #include "asterisk/dsp.h"
00073 #include "asterisk/features.h"
00074 #include "asterisk/acl.h"
00075 #include "asterisk/srv.h"
00076 #include "asterisk/astdb.h"
00077 #include "asterisk/causes.h"
00078 #include "asterisk/utils.h"
00079 #include "asterisk/file.h"
00080 #include "asterisk/astobj.h"
00081 #include "asterisk/devicestate.h"
00082 #include "asterisk/linkedlists.h"
00083
00084 #ifdef OSP_SUPPORT
00085 #include "asterisk/astosp.h"
00086 #endif
00087
00088 #ifndef DEFAULT_USERAGENT
00089 #define DEFAULT_USERAGENT "Asterisk PBX"
00090 #endif
00091
00092 #define VIDEO_CODEC_MASK 0x1fc0000
00093 #ifndef IPTOS_MINCOST
00094 #define IPTOS_MINCOST 0x02
00095 #endif
00096
00097
00098
00099 #define SIPDUMPER
00100 #define DEFAULT_DEFAULT_EXPIRY 120
00101 #define DEFAULT_MAX_EXPIRY 3600
00102 #define DEFAULT_REGISTRATION_TIMEOUT 20
00103 #define DEFAULT_MAX_FORWARDS "70"
00104
00105
00106
00107 #define EXPIRY_GUARD_SECS 15
00108 #define EXPIRY_GUARD_LIMIT 30
00109
00110 #define EXPIRY_GUARD_MIN 500
00111
00112
00113
00114 #define EXPIRY_GUARD_PCT 0.20
00115
00116
00117 #define SIP_LEN_CONTACT 256
00118
00119 static int max_expiry = DEFAULT_MAX_EXPIRY;
00120 static int default_expiry = DEFAULT_DEFAULT_EXPIRY;
00121
00122 #ifndef MAX
00123 #define MAX(a,b) ((a) > (b) ? (a) : (b))
00124 #endif
00125
00126 #define CALLERID_UNKNOWN "Unknown"
00127
00128
00129
00130 #define DEFAULT_MAXMS 2000
00131 #define DEFAULT_FREQ_OK 60 * 1000
00132 #define DEFAULT_FREQ_NOTOK 10 * 1000
00133
00134 #define DEFAULT_RETRANS 1000
00135
00136 #define MAX_RETRANS 6
00137 #define MAX_AUTHTRIES 3
00138
00139
00140 #define DEBUG_READ 0
00141 #define DEBUG_SEND 1
00142
00143 static const char desc[] = "Session Initiation Protocol (SIP)";
00144 static const char channeltype[] = "SIP";
00145 static const char config[] = "sip.conf";
00146 static const char notify_config[] = "sip_notify.conf";
00147
00148 #define RTP 1
00149 #define NO_RTP 0
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159 enum subscriptiontype {
00160 NONE = 0,
00161 XPIDF_XML,
00162 DIALOG_INFO_XML,
00163 CPIM_PIDF_XML,
00164 PIDF_XML
00165 };
00166
00167 static const struct cfsubscription_types {
00168 enum subscriptiontype type;
00169 const char * const event;
00170 const char * const mediatype;
00171 const char * const text;
00172 } subscription_types[] = {
00173 { NONE, "-", "unknown", "unknown" },
00174
00175 { DIALOG_INFO_XML, "dialog", "application/dialog-info+xml", "dialog-info+xml" },
00176 { CPIM_PIDF_XML, "presence", "application/cpim-pidf+xml", "cpim-pidf+xml" },
00177 { PIDF_XML, "presence", "application/pidf+xml", "pidf+xml" },
00178 { XPIDF_XML, "presence", "application/xpidf+xml", "xpidf+xml" }
00179 };
00180
00181 enum sipmethod {
00182 SIP_UNKNOWN,
00183 SIP_RESPONSE,
00184 SIP_REGISTER,
00185 SIP_OPTIONS,
00186 SIP_NOTIFY,
00187 SIP_INVITE,
00188 SIP_ACK,
00189 SIP_PRACK,
00190 SIP_BYE,
00191 SIP_REFER,
00192 SIP_SUBSCRIBE,
00193 SIP_MESSAGE,
00194 SIP_UPDATE,
00195 SIP_INFO,
00196 SIP_CANCEL,
00197 SIP_PUBLISH,
00198 } sip_method_list;
00199
00200 enum sip_auth_type {
00201 PROXY_AUTH,
00202 WWW_AUTH,
00203 };
00204
00205
00206 static const struct cfsip_methods {
00207 enum sipmethod id;
00208 int need_rtp;
00209 char * const text;
00210 int can_create;
00211 } sip_methods[] = {
00212 { SIP_UNKNOWN, RTP, "-UNKNOWN-", 2 },
00213 { SIP_RESPONSE, NO_RTP, "SIP/2.0", 0 },
00214 { SIP_REGISTER, NO_RTP, "REGISTER", 1 },
00215 { SIP_OPTIONS, NO_RTP, "OPTIONS", 1 },
00216 { SIP_NOTIFY, NO_RTP, "NOTIFY", 2 },
00217 { SIP_INVITE, RTP, "INVITE", 1 },
00218 { SIP_ACK, NO_RTP, "ACK", 0 },
00219 { SIP_PRACK, NO_RTP, "PRACK", 2 },
00220 { SIP_BYE, NO_RTP, "BYE", 0 },
00221 { SIP_REFER, NO_RTP, "REFER", 2 },
00222 { SIP_SUBSCRIBE, NO_RTP, "SUBSCRIBE", 1 },
00223 { SIP_MESSAGE, NO_RTP, "MESSAGE", 1 },
00224 { SIP_UPDATE, NO_RTP, "UPDATE", 0 },
00225 { SIP_INFO, NO_RTP, "INFO", 0 },
00226 { SIP_CANCEL, NO_RTP, "CANCEL", 0 },
00227 { SIP_PUBLISH, NO_RTP, "PUBLISH", 1 }
00228 };
00229
00230
00231 static const struct cfalias {
00232 char * const fullname;
00233 char * const shortname;
00234 } aliases[] = {
00235 { "Content-Type", "c" },
00236 { "Content-Encoding", "e" },
00237 { "From", "f" },
00238 { "Call-ID", "i" },
00239 { "Contact", "m" },
00240 { "Content-Length", "l" },
00241 { "Subject", "s" },
00242 { "To", "t" },
00243 { "Supported", "k" },
00244 { "Refer-To", "r" },
00245 { "Referred-By", "b" },
00246 { "Allow-Events", "u" },
00247 { "Event", "o" },
00248 { "Via", "v" },
00249 { "Accept-Contact", "a" },
00250 { "Reject-Contact", "j" },
00251 { "Request-Disposition", "d" },
00252 { "Session-Expires", "x" },
00253 };
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265 #define SUPPORTED 1
00266 #define NOT_SUPPORTED 0
00267
00268 #define SIP_OPT_REPLACES (1 << 0)
00269 #define SIP_OPT_100REL (1 << 1)
00270 #define SIP_OPT_TIMER (1 << 2)
00271 #define SIP_OPT_EARLY_SESSION (1 << 3)
00272 #define SIP_OPT_JOIN (1 << 4)
00273 #define SIP_OPT_PATH (1 << 5)
00274 #define SIP_OPT_PREF (1 << 6)
00275 #define SIP_OPT_PRECONDITION (1 << 7)
00276 #define SIP_OPT_PRIVACY (1 << 8)
00277 #define SIP_OPT_SDP_ANAT (1 << 9)
00278 #define SIP_OPT_SEC_AGREE (1 << 10)
00279 #define SIP_OPT_EVENTLIST (1 << 11)
00280 #define SIP_OPT_GRUU (1 << 12)
00281 #define SIP_OPT_TARGET_DIALOG (1 << 13)
00282
00283
00284
00285 static const struct cfsip_options {
00286 int id;
00287 int supported;
00288 char * const text;
00289 } sip_options[] = {
00290
00291 { SIP_OPT_REPLACES, SUPPORTED, "replaces" },
00292
00293 { SIP_OPT_100REL, NOT_SUPPORTED, "100rel" },
00294
00295 { SIP_OPT_TIMER, NOT_SUPPORTED, "timer" },
00296
00297 { SIP_OPT_EARLY_SESSION, NOT_SUPPORTED, "early-session" },
00298
00299 { SIP_OPT_JOIN, NOT_SUPPORTED, "join" },
00300
00301 { SIP_OPT_PATH, NOT_SUPPORTED, "path" },
00302
00303 { SIP_OPT_PREF, NOT_SUPPORTED, "pref" },
00304
00305 { SIP_OPT_PRECONDITION, NOT_SUPPORTED, "precondition" },
00306
00307 { SIP_OPT_PRIVACY, NOT_SUPPORTED, "privacy" },
00308
00309 { SIP_OPT_SDP_ANAT, NOT_SUPPORTED, "sdp-anat" },
00310
00311 { SIP_OPT_SEC_AGREE, NOT_SUPPORTED, "sec_agree" },
00312
00313 { SIP_OPT_EVENTLIST, NOT_SUPPORTED, "eventlist" },
00314
00315 { SIP_OPT_GRUU, NOT_SUPPORTED, "gruu" },
00316
00317 { SIP_OPT_TARGET_DIALOG,NOT_SUPPORTED, "target-dialog" },
00318 };
00319
00320
00321
00322 #define ALLOWED_METHODS "INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY"
00323
00324
00325 #define SUPPORTED_EXTENSIONS "replaces"
00326
00327 #define DEFAULT_SIP_PORT 5060
00328 #define SIP_MAX_PACKET 4096
00329
00330 static char default_useragent[AST_MAX_EXTENSION] = DEFAULT_USERAGENT;
00331
00332 #define DEFAULT_CONTEXT "default"
00333 static char default_context[AST_MAX_CONTEXT] = DEFAULT_CONTEXT;
00334 static char default_subscribecontext[AST_MAX_CONTEXT];
00335
00336 #define DEFAULT_VMEXTEN "asterisk"
00337 static char global_vmexten[AST_MAX_EXTENSION] = DEFAULT_VMEXTEN;
00338
00339 static char default_language[MAX_LANGUAGE] = "";
00340
00341 #define DEFAULT_CALLERID "asterisk"
00342 static char default_callerid[AST_MAX_EXTENSION] = DEFAULT_CALLERID;
00343
00344 static char default_fromdomain[AST_MAX_EXTENSION] = "";
00345
00346 #define DEFAULT_NOTIFYMIME "application/simple-message-summary"
00347 static char default_notifymime[AST_MAX_EXTENSION] = DEFAULT_NOTIFYMIME;
00348
00349 static int global_notifyringing = 1;
00350
00351 static int global_alwaysauthreject = 0;
00352
00353 static int default_qualify = 0;
00354
00355 static struct ast_flags global_flags = {0};
00356 static struct ast_flags global_flags_page2 = {0};
00357
00358 static int srvlookup = 0;
00359
00360 static int pedanticsipchecking = 0;
00361
00362 static int autocreatepeer = 0;
00363
00364 static int relaxdtmf = 0;
00365
00366 static int global_rtptimeout = 0;
00367
00368 static int global_rtpholdtimeout = 0;
00369
00370 static int global_rtpkeepalive = 0;
00371
00372 static int global_reg_timeout = DEFAULT_REGISTRATION_TIMEOUT;
00373 static int global_regattempts_max = 0;
00374
00375
00376 static int suserobjs = 0;
00377 static int ruserobjs = 0;
00378 static int speerobjs = 0;
00379 static int rpeerobjs = 0;
00380 static int apeerobjs = 0;
00381 static int regobjs = 0;
00382
00383 static int global_allowguest = 1;
00384
00385 #define DEFAULT_MWITIME 10
00386 static int global_mwitime = DEFAULT_MWITIME;
00387
00388 static int usecnt =0;
00389 AST_MUTEX_DEFINE_STATIC(usecnt_lock);
00390
00391 AST_MUTEX_DEFINE_STATIC(rand_lock);
00392
00393
00394 AST_MUTEX_DEFINE_STATIC(iflock);
00395
00396
00397
00398 AST_MUTEX_DEFINE_STATIC(netlock);
00399
00400 AST_MUTEX_DEFINE_STATIC(monlock);
00401
00402
00403
00404 static pthread_t monitor_thread = AST_PTHREADT_NULL;
00405
00406 static int restart_monitor(void);
00407
00408
00409 static int global_capability = AST_FORMAT_ULAW | AST_FORMAT_ALAW | AST_FORMAT_GSM | AST_FORMAT_H263;
00410
00411 static struct in_addr __ourip;
00412 static struct sockaddr_in outboundproxyip;
00413 static int ourport;
00414
00415 #define SIP_DEBUG_CONFIG 1 << 0
00416 #define SIP_DEBUG_CONSOLE 1 << 1
00417 static int sipdebug = 0;
00418 static struct sockaddr_in debugaddr;
00419
00420 static int tos = 0;
00421
00422 static int videosupport = 0;
00423
00424 static int compactheaders = 0;
00425
00426 static int recordhistory = 0;
00427 static int dumphistory = 0;
00428
00429 static char global_musicclass[MAX_MUSICCLASS] = "";
00430 #define DEFAULT_REALM "asterisk"
00431 static char global_realm[MAXHOSTNAMELEN] = DEFAULT_REALM;
00432 static char regcontext[AST_MAX_CONTEXT] = "";
00433
00434 #define DEFAULT_EXPIRY 900
00435 static int expiry = DEFAULT_EXPIRY;
00436
00437 #define DEFAULT_T1MIN 100
00438
00439 static struct sched_context *sched;
00440 static struct io_context *io;
00441 static int *sipsock_read_id;
00442
00443 #define SIP_MAX_HEADERS 64
00444 #define SIP_MAX_LINES 64
00445
00446 #define DEC_CALL_LIMIT 0
00447 #define INC_CALL_LIMIT 1
00448
00449 static struct ast_codec_pref prefs;
00450
00451
00452
00453 struct sip_request {
00454 char *rlPart1;
00455 char *rlPart2;
00456 int len;
00457 int headers;
00458 int method;
00459 char *header[SIP_MAX_HEADERS];
00460 int lines;
00461 char *line[SIP_MAX_LINES];
00462 char data[SIP_MAX_PACKET];
00463 int debug;
00464 unsigned int flags;
00465 unsigned int sdp_start;
00466 unsigned int sdp_end;
00467 };
00468
00469 struct sip_pkt;
00470
00471
00472 struct sip_invite_param {
00473 char *distinctive_ring;
00474 char *osptoken;
00475 int addsipheaders;
00476 char *uri_options;
00477 char *vxml_url;
00478 char *auth;
00479 char *authheader;
00480 enum sip_auth_type auth_type;
00481 };
00482
00483 struct sip_route {
00484 struct sip_route *next;
00485 char hop[0];
00486 };
00487
00488 enum domain_mode {
00489 SIP_DOMAIN_AUTO,
00490 SIP_DOMAIN_CONFIG,
00491 };
00492
00493 struct domain {
00494 char domain[MAXHOSTNAMELEN];
00495 char context[AST_MAX_EXTENSION];
00496 enum domain_mode mode;
00497 AST_LIST_ENTRY(domain) list;
00498 };
00499
00500 static AST_LIST_HEAD_STATIC(domain_list, domain);
00501
00502 int allow_external_domains;
00503
00504
00505 struct sip_history {
00506 char event[80];
00507 struct sip_history *next;
00508 };
00509
00510
00511 struct sip_auth {
00512 char realm[AST_MAX_EXTENSION];
00513 char username[256];
00514 char secret[256];
00515 char md5secret[256];
00516 struct sip_auth *next;
00517 };
00518
00519 #define SIP_ALREADYGONE (1 << 0)
00520 #define SIP_NEEDDESTROY (1 << 1)
00521 #define SIP_NOVIDEO (1 << 2)
00522 #define SIP_RINGING (1 << 3)
00523 #define SIP_PROGRESS_SENT (1 << 4)
00524 #define SIP_NEEDREINVITE (1 << 5)
00525 #define SIP_PENDINGBYE (1 << 6)
00526 #define SIP_GOTREFER (1 << 7)
00527 #define SIP_PROMISCREDIR (1 << 8)
00528 #define SIP_TRUSTRPID (1 << 9)
00529 #define SIP_USEREQPHONE (1 << 10)
00530 #define SIP_REALTIME (1 << 11)
00531 #define SIP_USECLIENTCODE (1 << 12)
00532 #define SIP_OUTGOING (1 << 13)
00533 #define SIP_SELFDESTRUCT (1 << 14)
00534 #define SIP_CAN_BYE (1 << 15)
00535
00536 #define SIP_DTMF (3 << 16)
00537 #define SIP_DTMF_RFC2833 (0 << 16)
00538 #define SIP_DTMF_INBAND (1 << 16)
00539 #define SIP_DTMF_INFO (2 << 16)
00540 #define SIP_DTMF_AUTO (3 << 16)
00541
00542 #define SIP_NAT (3 << 18)
00543 #define SIP_NAT_NEVER (0 << 18)
00544 #define SIP_NAT_RFC3581 (1 << 18)
00545 #define SIP_NAT_ROUTE (2 << 18)
00546 #define SIP_NAT_ALWAYS (3 << 18)
00547
00548 #define SIP_REINVITE (3 << 20)
00549 #define SIP_CAN_REINVITE (1 << 20)
00550 #define SIP_REINVITE_UPDATE (2 << 20)
00551
00552 #define SIP_INSECURE_PORT (1 << 22)
00553 #define SIP_INSECURE_INVITE (1 << 23)
00554
00555 #define SIP_PROG_INBAND (3 << 24)
00556 #define SIP_PROG_INBAND_NEVER (0 << 24)
00557 #define SIP_PROG_INBAND_NO (1 << 24)
00558 #define SIP_PROG_INBAND_YES (2 << 24)
00559
00560 #define SIP_OSPAUTH (3 << 26)
00561 #define SIP_OSPAUTH_NO (0 << 26)
00562 #define SIP_OSPAUTH_GATEWAY (1 << 26)
00563 #define SIP_OSPAUTH_PROXY (2 << 26)
00564 #define SIP_OSPAUTH_EXCLUSIVE (3 << 26)
00565
00566 #define SIP_CALL_ONHOLD (1 << 28)
00567 #define SIP_CALL_LIMIT (1 << 29)
00568
00569 #define SIP_SENDRPID (1 << 30)
00570 #define SIP_INC_COUNT (1 << 31)
00571
00572 #define SIP_FLAGS_TO_COPY \
00573 (SIP_PROMISCREDIR | SIP_TRUSTRPID | SIP_SENDRPID | SIP_DTMF | SIP_REINVITE | \
00574 SIP_PROG_INBAND | SIP_OSPAUTH | SIP_USECLIENTCODE | SIP_NAT | \
00575 SIP_USEREQPHONE | SIP_INSECURE_PORT | SIP_INSECURE_INVITE)
00576
00577
00578 #define SIP_PAGE2_RTCACHEFRIENDS (1 << 0)
00579 #define SIP_PAGE2_RTUPDATE (1 << 1)
00580 #define SIP_PAGE2_RTAUTOCLEAR (1 << 2)
00581 #define SIP_PAGE2_IGNOREREGEXPIRE (1 << 3)
00582 #define SIP_PAGE2_RT_FROMCONTACT (1 << 4)
00583 #define SIP_PAGE2_DYNAMIC (1 << 5)
00584
00585
00586 #define SIP_PKT_DEBUG (1 << 0)
00587 #define SIP_PKT_WITH_TOTAG (1 << 1)
00588
00589 static int global_rtautoclear;
00590
00591
00592 static struct sip_pvt {
00593 ast_mutex_t lock;
00594 int method;
00595 char callid[128];
00596 char randdata[80];
00597 struct ast_codec_pref prefs;
00598 unsigned int ocseq;
00599 unsigned int icseq;
00600 ast_group_t callgroup;
00601 ast_group_t pickupgroup;
00602 int lastinvite;
00603 unsigned int flags;
00604 int timer_t1;
00605 unsigned int sipoptions;
00606 int capability;
00607 int jointcapability;
00608 int peercapability;
00609 int prefcodec;
00610 int noncodeccapability;
00611 int jointnoncodeccapability;
00612 int callingpres;
00613 int authtries;
00614 int expiry;
00615 int branch;
00616 char tag[11];
00617 int sessionid;
00618 int sessionversion;
00619 struct sockaddr_in sa;
00620 struct sockaddr_in redirip;
00621 struct sockaddr_in vredirip;
00622 int redircodecs;
00623 struct sockaddr_in recv;
00624 struct in_addr ourip;
00625 struct ast_channel *owner;
00626 char exten[AST_MAX_EXTENSION];
00627 char refer_to[AST_MAX_EXTENSION];
00628 char referred_by[AST_MAX_EXTENSION];
00629 char refer_contact[SIP_LEN_CONTACT];
00630 struct sip_pvt *refer_call;
00631 struct sip_route *route;
00632 int route_persistant;
00633 char from[256];
00634 char useragent[256];
00635 char context[AST_MAX_CONTEXT];
00636 char subscribecontext[AST_MAX_CONTEXT];
00637 char fromdomain[MAXHOSTNAMELEN];
00638 char fromuser[AST_MAX_EXTENSION];
00639 char fromname[AST_MAX_EXTENSION];
00640 char tohost[MAXHOSTNAMELEN];
00641 char language[MAX_LANGUAGE];
00642 char musicclass[MAX_MUSICCLASS];
00643 char rdnis[256];
00644 char theirtag[256];
00645 char username[256];
00646 char peername[256];
00647 char authname[256];
00648 char uri[256];
00649 char okcontacturi[SIP_LEN_CONTACT];
00650 char peersecret[256];
00651 char peermd5secret[256];
00652 struct sip_auth *peerauth;
00653 char cid_num[256];
00654 char cid_name[256];
00655 char via[256];
00656 char fullcontact[SIP_LEN_CONTACT];
00657 char accountcode[AST_MAX_ACCOUNT_CODE];
00658 char our_contact[SIP_LEN_CONTACT];
00659 char *rpid;
00660 char *rpid_from;
00661 char realm[MAXHOSTNAMELEN];
00662 char nonce[256];
00663 int noncecount;
00664 char opaque[256];
00665 char qop[80];
00666 char domain[MAXHOSTNAMELEN];
00667 char lastmsg[256];
00668 int amaflags;
00669 int pendinginvite;
00670 #ifdef OSP_SUPPORT
00671 int osphandle;
00672 time_t ospstart;
00673 unsigned int osptimelimit;
00674 #endif
00675 struct sip_request initreq;
00676
00677 int maxtime;
00678 int initid;
00679 int autokillid;
00680 time_t lastrtprx;
00681 time_t lastrtptx;
00682 int rtptimeout;
00683 int rtpholdtimeout;
00684 int rtpkeepalive;
00685 enum subscriptiontype subscribed;
00686 int stateid;
00687 int laststate;
00688 int dialogver;
00689
00690 struct ast_dsp *vad;
00691
00692 struct sip_peer *peerpoke;
00693 struct sip_registry *registry;
00694 struct ast_rtp *rtp;
00695 struct ast_rtp *vrtp;
00696 struct sip_pkt *packets;
00697 struct sip_history *history;