Asterisk - The Open Source Telephony Project GIT-master-a358458
Data Structures | Macros | Typedefs | Enumerations | Functions
dundi.h File Reference

Distributed Universal Number Discovery (DUNDi) See also. More...

#include "asterisk/channel.h"
#include "asterisk/utils.h"
Include dependency graph for dundi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dundi_answer
 
struct  dundi_cause
 
struct  dundi_encblock
 
struct  dundi_entity_info
 
struct  dundi_hdr
 
struct  dundi_hint
 
struct  dundi_ie_hdr
 
struct  dundi_peer_status
 
struct  dundi_result
 

Macros

#define DEFAULT_MAXMS   2000
 
#define DUNDI_COMMAND_ACK   (0 | 0x40)
 
#define DUNDI_COMMAND_CANCEL   (12)
 
#define DUNDI_COMMAND_DPDISCOVER   1
 
#define DUNDI_COMMAND_DPRESPONSE   (2 | 0x40)
 
#define DUNDI_COMMAND_EIDQUERY   3
 
#define DUNDI_COMMAND_EIDRESPONSE   (4 | 0x40)
 
#define DUNDI_COMMAND_ENCREJ   (14 | 0x40)
 
#define DUNDI_COMMAND_ENCRYPT   (13)
 
#define DUNDI_COMMAND_FINAL   (0x80)
 
#define DUNDI_COMMAND_INVALID   (7 | 0x40)
 
#define DUNDI_COMMAND_NULL   9
 
#define DUNDI_COMMAND_PRECACHERP   (6 | 0x40)
 
#define DUNDI_COMMAND_PRECACHERQ   5
 
#define DUNDI_COMMAND_REGREQ   (10)
 
#define DUNDI_COMMAND_REGRESPONSE   (11 | 0x40)
 
#define DUNDI_COMMAND_STATUS   15
 
#define DUNDI_COMMAND_UNKNOWN   (8 | 0x40)
 
#define DUNDI_DEF_EMPTY_CACHE_TIME   60
 
#define DUNDI_DEFAULT_CACHE_TIME   3600
 
#define DUNDI_DEFAULT_KEY_EXPIRE   3600
 
#define DUNDI_DEFAULT_RETRANS   5
 
#define DUNDI_DEFAULT_RETRANS_TIMER   1000
 
#define DUNDI_DEFAULT_TTL   120
 
#define DUNDI_DEFAULT_VERSION   1
 
#define DUNDI_FLAG_RESERVED   (1 << 16)
 
#define DUNDI_FLAG_RETRANS   (1 << 16)
 
#define DUNDI_FLUFF_TIME   2000
 
#define DUNDI_IE_ANSWER   5
 
#define DUNDI_IE_CACHEBYPASS   29
 
#define DUNDI_IE_CALLED_CONTEXT   2
 
#define DUNDI_IE_CALLED_NUMBER   3
 
#define DUNDI_IE_CAUSE   14
 
#define DUNDI_IE_COUNTRY   25
 
#define DUNDI_IE_DEPARTMENT   21
 
#define DUNDI_IE_EID   1
 
#define DUNDI_IE_EID_DIRECT   4
 
#define DUNDI_IE_EMAIL   26
 
#define DUNDI_IE_ENCDATA   16
 
#define DUNDI_IE_EXPIRATION   11
 
#define DUNDI_IE_HINT   20
 
#define DUNDI_IE_IPADDR   28
 
#define DUNDI_IE_KEYCRC32   19
 
#define DUNDI_IE_LOCALITY   23
 
#define DUNDI_IE_ORGANIZATION   22
 
#define DUNDI_IE_PEERSTATUS   30
 
#define DUNDI_IE_PHONE   27
 
#define DUNDI_IE_REQEID   15
 
#define DUNDI_IE_SHAREDKEY   17
 
#define DUNDI_IE_SIGNATURE   18
 
#define DUNDI_IE_STATE_PROV   24
 
#define DUNDI_IE_TTL   6
 
#define DUNDI_IE_UNKNOWN   12
 
#define DUNDI_IE_VERSION   10
 
#define DUNDI_PORT   4520
 
#define DUNDI_TTL_TIME   200
 
#define DUNDI_WINDOW   1
 

Typedefs

typedef struct ast_eid dundi_eid
 

Enumerations

enum  {
  DUNDI_PROTO_NONE = 0 , DUNDI_PROTO_IAX = 1 , DUNDI_PROTO_SIP = 2 , DUNDI_PROTO_H323 = 3 ,
  DUNDI_PROTO_PJSIP = 4
}
 
enum  {
  DUNDI_FLAG_NONEXISTENT = (0) , DUNDI_FLAG_EXISTS = (1 << 0) , DUNDI_FLAG_MATCHMORE = (1 << 1) , DUNDI_FLAG_CANMATCH = (1 << 2) ,
  DUNDI_FLAG_IGNOREPAT = (1 << 3) , DUNDI_FLAG_RESIDENTIAL = (1 << 4) , DUNDI_FLAG_COMMERCIAL = (1 << 5) , DUNDI_FLAG_MOBILE = (1 << 6) ,
  DUNDI_FLAG_NOUNSOLICITED = (1 << 7) , DUNDI_FLAG_NOCOMUNSOLICIT = (1 << 8)
}
 
enum  { DUNDI_HINT_NONE = (0) , DUNDI_HINT_TTL_EXPIRED = (1 << 0) , DUNDI_HINT_DONT_ASK = (1 << 1) , DUNDI_HINT_UNAFFECTED = (1 << 2) }
 
enum  {
  DUNDI_CAUSE_SUCCESS = 0 , DUNDI_CAUSE_GENERAL = 1 , DUNDI_CAUSE_DYNAMIC = 2 , DUNDI_CAUSE_NOAUTH = 3 ,
  DUNDI_CAUSE_DUPLICATE = 4 , DUNDI_CAUSE_TTL_EXPIRED = 5 , DUNDI_CAUSE_NEEDKEY = 6 , DUNDI_CAUSE_BADENCRYPT = 7
}
 
enum  {
  DUNDI_PEER_PRIMARY = (1 << 0) , DUNDI_PEER_SECONDARY = (1 << 1) , DUNDI_PEER_UNAVAILABLE = (1 << 2) , DUNDI_PEER_REGISTERED = (1 << 3) ,
  DUNDI_PEER_MOD_OUTBOUND = (1 << 4) , DUNDI_PEER_MOD_INBOUND = (1 << 5) , DUNDI_PEER_PCMOD_OUTBOUND = (1 << 6) , DUNDI_PEER_PCMOD_INBOUND = (1 << 7)
}
 

Functions

int dundi_lookup (struct dundi_result *result, int maxret, struct ast_channel *chan, const char *dcontext, const char *number, int nocache)
 Lookup the given number in the given dundi context. Lookup number in a given dundi context (if unspecified use e164), the given callerid (if specified) and return up to maxret results in the array specified. More...
 
int dundi_precache (const char *dcontext, const char *number)
 Pre-cache to push upstream peers. More...
 
int dundi_query_eid (struct dundi_entity_info *dei, const char *dcontext, dundi_eid eid)
 Retrieve information on a specific EID. More...
 

Detailed Description

Distributed Universal Number Discovery (DUNDi) See also.

Definition in file dundi.h.

Macro Definition Documentation

◆ DEFAULT_MAXMS

#define DEFAULT_MAXMS   2000

Definition at line 225 of file dundi.h.

◆ DUNDI_COMMAND_ACK

#define DUNDI_COMMAND_ACK   (0 | 0x40)

Ack a message

Definition at line 161 of file dundi.h.

◆ DUNDI_COMMAND_CANCEL

#define DUNDI_COMMAND_CANCEL   (12)

Cancel transaction entirely

Definition at line 173 of file dundi.h.

◆ DUNDI_COMMAND_DPDISCOVER

#define DUNDI_COMMAND_DPDISCOVER   1

Request discovery

Definition at line 162 of file dundi.h.

◆ DUNDI_COMMAND_DPRESPONSE

#define DUNDI_COMMAND_DPRESPONSE   (2 | 0x40)

Respond to a discovery request

Definition at line 163 of file dundi.h.

◆ DUNDI_COMMAND_EIDQUERY

#define DUNDI_COMMAND_EIDQUERY   3

Request information for a peer

Definition at line 164 of file dundi.h.

◆ DUNDI_COMMAND_EIDRESPONSE

#define DUNDI_COMMAND_EIDRESPONSE   (4 | 0x40)

Response to a peer query

Definition at line 165 of file dundi.h.

◆ DUNDI_COMMAND_ENCREJ

#define DUNDI_COMMAND_ENCREJ   (14 | 0x40)

Reject an encrypted message

Definition at line 175 of file dundi.h.

◆ DUNDI_COMMAND_ENCRYPT

#define DUNDI_COMMAND_ENCRYPT   (13)

Send an encrypted message

Definition at line 174 of file dundi.h.

◆ DUNDI_COMMAND_FINAL

#define DUNDI_COMMAND_FINAL   (0x80)

Or'd with other flags

Definition at line 159 of file dundi.h.

◆ DUNDI_COMMAND_INVALID

#define DUNDI_COMMAND_INVALID   (7 | 0x40)

Invalid dialog state (does not require ack)

Definition at line 168 of file dundi.h.

◆ DUNDI_COMMAND_NULL

#define DUNDI_COMMAND_NULL   9

No-op

Definition at line 170 of file dundi.h.

◆ DUNDI_COMMAND_PRECACHERP

#define DUNDI_COMMAND_PRECACHERP   (6 | 0x40)

Pre-cache Response

Definition at line 167 of file dundi.h.

◆ DUNDI_COMMAND_PRECACHERQ

#define DUNDI_COMMAND_PRECACHERQ   5

Pre-cache Request

Definition at line 166 of file dundi.h.

◆ DUNDI_COMMAND_REGREQ

#define DUNDI_COMMAND_REGREQ   (10)

Register Request

Definition at line 171 of file dundi.h.

◆ DUNDI_COMMAND_REGRESPONSE

#define DUNDI_COMMAND_REGRESPONSE   (11 | 0x40)

Register Response

Definition at line 172 of file dundi.h.

◆ DUNDI_COMMAND_STATUS

#define DUNDI_COMMAND_STATUS   15

Status command

Definition at line 177 of file dundi.h.

◆ DUNDI_COMMAND_UNKNOWN

#define DUNDI_COMMAND_UNKNOWN   (8 | 0x40)

Unknown command

Definition at line 169 of file dundi.h.

◆ DUNDI_DEF_EMPTY_CACHE_TIME

#define DUNDI_DEF_EMPTY_CACHE_TIME   60

In seconds, cache of empty answer

Definition at line 222 of file dundi.h.

◆ DUNDI_DEFAULT_CACHE_TIME

#define DUNDI_DEFAULT_CACHE_TIME   3600

In seconds

Definition at line 220 of file dundi.h.

◆ DUNDI_DEFAULT_KEY_EXPIRE

#define DUNDI_DEFAULT_KEY_EXPIRE   3600

Life of shared key In seconds

Definition at line 221 of file dundi.h.

◆ DUNDI_DEFAULT_RETRANS

#define DUNDI_DEFAULT_RETRANS   5

Definition at line 216 of file dundi.h.

◆ DUNDI_DEFAULT_RETRANS_TIMER

#define DUNDI_DEFAULT_RETRANS_TIMER   1000

Definition at line 217 of file dundi.h.

◆ DUNDI_DEFAULT_TTL

#define DUNDI_DEFAULT_TTL   120

In seconds/hops like TTL

Definition at line 218 of file dundi.h.

◆ DUNDI_DEFAULT_VERSION

#define DUNDI_DEFAULT_VERSION   1

Definition at line 219 of file dundi.h.

◆ DUNDI_FLAG_RESERVED

#define DUNDI_FLAG_RESERVED   (1 << 16)

Applies to strans

Definition at line 51 of file dundi.h.

◆ DUNDI_FLAG_RETRANS

#define DUNDI_FLAG_RETRANS   (1 << 16)

Applies to dtrans

Definition at line 50 of file dundi.h.

◆ DUNDI_FLUFF_TIME

#define DUNDI_FLUFF_TIME   2000

Amount of time for answer

Definition at line 213 of file dundi.h.

◆ DUNDI_IE_ANSWER

#define DUNDI_IE_ANSWER   5

An answer (struct dundi_answer)

Definition at line 188 of file dundi.h.

◆ DUNDI_IE_CACHEBYPASS

#define DUNDI_IE_CACHEBYPASS   29

Bypass cache (empty)

Definition at line 209 of file dundi.h.

◆ DUNDI_IE_CALLED_CONTEXT

#define DUNDI_IE_CALLED_CONTEXT   2

DUNDi Context (string)

Definition at line 185 of file dundi.h.

◆ DUNDI_IE_CALLED_NUMBER

#define DUNDI_IE_CALLED_NUMBER   3

Number of equivalent (string)

Definition at line 186 of file dundi.h.

◆ DUNDI_IE_CAUSE

#define DUNDI_IE_CAUSE   14

Success or cause of failure

Definition at line 193 of file dundi.h.

◆ DUNDI_IE_COUNTRY

#define DUNDI_IE_COUNTRY   25

Country, for EIDQUERY (string)

Definition at line 205 of file dundi.h.

◆ DUNDI_IE_DEPARTMENT

#define DUNDI_IE_DEPARTMENT   21

Department, for EIDQUERY (string)

Definition at line 201 of file dundi.h.

◆ DUNDI_IE_EID

#define DUNDI_IE_EID   1

Entity identifier (dundi_eid)

Definition at line 184 of file dundi.h.

◆ DUNDI_IE_EID_DIRECT

#define DUNDI_IE_EID_DIRECT   4

Entity identifier (dundi_eid), direct connect

Definition at line 187 of file dundi.h.

◆ DUNDI_IE_EMAIL

#define DUNDI_IE_EMAIL   26

E-mail addy, for EIDQUERY (string)

Definition at line 206 of file dundi.h.

◆ DUNDI_IE_ENCDATA

#define DUNDI_IE_ENCDATA   16

AES-128 encrypted data

Definition at line 195 of file dundi.h.

◆ DUNDI_IE_EXPIRATION

#define DUNDI_IE_EXPIRATION   11

Recommended expiration (short)

Definition at line 191 of file dundi.h.

◆ DUNDI_IE_HINT

#define DUNDI_IE_HINT   20

Answer hints

Definition at line 199 of file dundi.h.

◆ DUNDI_IE_IPADDR

#define DUNDI_IE_IPADDR   28

IP Address, for EIDQUERY (string)

Definition at line 208 of file dundi.h.

◆ DUNDI_IE_KEYCRC32

#define DUNDI_IE_KEYCRC32   19

CRC32 of encrypted key (int)

Definition at line 198 of file dundi.h.

◆ DUNDI_IE_LOCALITY

#define DUNDI_IE_LOCALITY   23

City/Locality, for EIDQUERY (string)

Definition at line 203 of file dundi.h.

◆ DUNDI_IE_ORGANIZATION

#define DUNDI_IE_ORGANIZATION   22

Organization, for EIDQUERY (string)

Definition at line 202 of file dundi.h.

◆ DUNDI_IE_PEERSTATUS

#define DUNDI_IE_PEERSTATUS   30

Peer/peer status (struct dundi_peer_status)

Definition at line 211 of file dundi.h.

◆ DUNDI_IE_PHONE

#define DUNDI_IE_PHONE   27

Contact Phone, for EIDQUERY (string)

Definition at line 207 of file dundi.h.

◆ DUNDI_IE_REQEID

#define DUNDI_IE_REQEID   15

EID being requested for EIDQUERY

Definition at line 194 of file dundi.h.

◆ DUNDI_IE_SHAREDKEY

#define DUNDI_IE_SHAREDKEY   17

RSA encrypted AES-128 key

Definition at line 196 of file dundi.h.

◆ DUNDI_IE_SIGNATURE

#define DUNDI_IE_SIGNATURE   18

RSA Signature of encrypted shared key

Definition at line 197 of file dundi.h.

◆ DUNDI_IE_STATE_PROV

#define DUNDI_IE_STATE_PROV   24

State/Province, for EIDQUERY (string)

Definition at line 204 of file dundi.h.

◆ DUNDI_IE_TTL

#define DUNDI_IE_TTL   6

Max TTL for this request / Remaining TTL for the response (short)

Definition at line 189 of file dundi.h.

◆ DUNDI_IE_UNKNOWN

#define DUNDI_IE_UNKNOWN   12

Unknown command (byte)

Definition at line 192 of file dundi.h.

◆ DUNDI_IE_VERSION

#define DUNDI_IE_VERSION   10

DUNDi version (should be 1) (short)

Definition at line 190 of file dundi.h.

◆ DUNDI_PORT

#define DUNDI_PORT   4520

Definition at line 30 of file dundi.h.

◆ DUNDI_TTL_TIME

#define DUNDI_TTL_TIME   200

Incremental average time

Definition at line 214 of file dundi.h.

◆ DUNDI_WINDOW

#define DUNDI_WINDOW   1

Max 1 message in window

Definition at line 223 of file dundi.h.

Typedef Documentation

◆ dundi_eid

typedef struct ast_eid dundi_eid

Definition at line 32 of file dundi.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
DUNDI_PROTO_NONE 

No answer yet

DUNDI_PROTO_IAX 

IAX, version 2

DUNDI_PROTO_SIP 

SIP - Session Initiation Protocol, RFC 3261

DUNDI_PROTO_H323 

ITU H.323

DUNDI_PROTO_PJSIP 

PJSIP

Definition at line 53 of file dundi.h.

53 {
54 /*! No answer yet */
56 /*! IAX, version 2 */
58 /*! SIP - Session Initiation Protocol, RFC 3261 */
60 /*! ITU H.323 */
62 /*! PJSIP */
64};
@ DUNDI_PROTO_NONE
Definition: dundi.h:55
@ DUNDI_PROTO_PJSIP
Definition: dundi.h:63
@ DUNDI_PROTO_SIP
Definition: dundi.h:59
@ DUNDI_PROTO_IAX
Definition: dundi.h:57
@ DUNDI_PROTO_H323
Definition: dundi.h:61

◆ anonymous enum

anonymous enum
Enumerator
DUNDI_FLAG_NONEXISTENT 

Isn't and can't be a valid number

DUNDI_FLAG_EXISTS 

Is a valid number

DUNDI_FLAG_MATCHMORE 

Might be valid if you add more digits

DUNDI_FLAG_CANMATCH 

Might be a match

DUNDI_FLAG_IGNOREPAT 

Keep dialtone

DUNDI_FLAG_RESIDENTIAL 

Destination known to be residential

DUNDI_FLAG_COMMERCIAL 

Destination known to be commercial

DUNDI_FLAG_MOBILE 

Destination known to be cellular/mobile

DUNDI_FLAG_NOUNSOLICITED 

No unsolicited calls of any kind through this route

DUNDI_FLAG_NOCOMUNSOLICIT 

No commercial unsolicited calls through this route

Definition at line 66 of file dundi.h.

66 {
67 /*! Isn't and can't be a valid number */
69 /*! Is a valid number */
70 DUNDI_FLAG_EXISTS = (1 << 0),
71 /*! Might be valid if you add more digits */
72 DUNDI_FLAG_MATCHMORE = (1 << 1),
73 /*! Might be a match */
74 DUNDI_FLAG_CANMATCH = (1 << 2),
75 /*! Keep dialtone */
76 DUNDI_FLAG_IGNOREPAT = (1 << 3),
77 /*! Destination known to be residential */
78 DUNDI_FLAG_RESIDENTIAL = (1 << 4),
79 /*! Destination known to be commercial */
80 DUNDI_FLAG_COMMERCIAL = (1 << 5),
81 /*! Destination known to be cellular/mobile */
82 DUNDI_FLAG_MOBILE = (1 << 6),
83 /*! No unsolicited calls of any kind through this route */
84 DUNDI_FLAG_NOUNSOLICITED = (1 << 7),
85 /*! No commercial unsolicited calls through this route */
87};
@ DUNDI_FLAG_MOBILE
Definition: dundi.h:82
@ DUNDI_FLAG_NONEXISTENT
Definition: dundi.h:68
@ DUNDI_FLAG_COMMERCIAL
Definition: dundi.h:80
@ DUNDI_FLAG_NOCOMUNSOLICIT
Definition: dundi.h:86
@ DUNDI_FLAG_CANMATCH
Definition: dundi.h:74
@ DUNDI_FLAG_MATCHMORE
Definition: dundi.h:72
@ DUNDI_FLAG_RESIDENTIAL
Definition: dundi.h:78
@ DUNDI_FLAG_EXISTS
Definition: dundi.h:70
@ DUNDI_FLAG_IGNOREPAT
Definition: dundi.h:76
@ DUNDI_FLAG_NOUNSOLICITED
Definition: dundi.h:84

◆ anonymous enum

anonymous enum
Enumerator
DUNDI_HINT_NONE 
DUNDI_HINT_TTL_EXPIRED 

TTL Expired

DUNDI_HINT_DONT_ASK 

Don't ask for anything beginning with data

DUNDI_HINT_UNAFFECTED 

Answer not affected by entity list

Definition at line 89 of file dundi.h.

89 {
90 DUNDI_HINT_NONE = (0),
91 /*! TTL Expired */
92 DUNDI_HINT_TTL_EXPIRED = (1 << 0),
93 /*! Don't ask for anything beginning with data */
94 DUNDI_HINT_DONT_ASK = (1 << 1),
95 /*! Answer not affected by entity list */
96 DUNDI_HINT_UNAFFECTED = (1 << 2),
97};
@ DUNDI_HINT_DONT_ASK
Definition: dundi.h:94
@ DUNDI_HINT_UNAFFECTED
Definition: dundi.h:96
@ DUNDI_HINT_TTL_EXPIRED
Definition: dundi.h:92
@ DUNDI_HINT_NONE
Definition: dundi.h:90

◆ anonymous enum

anonymous enum
Enumerator
DUNDI_CAUSE_SUCCESS 

Success

DUNDI_CAUSE_GENERAL 

General unspecified failure

DUNDI_CAUSE_DYNAMIC 

Requested entity is dynamic

DUNDI_CAUSE_NOAUTH 

No or improper authorization

DUNDI_CAUSE_DUPLICATE 

Duplicate request

DUNDI_CAUSE_TTL_EXPIRED 

Expired TTL

DUNDI_CAUSE_NEEDKEY 

Need new session key to decode

DUNDI_CAUSE_BADENCRYPT 

Badly encrypted data

Definition at line 117 of file dundi.h.

117 {
118 /*! Success */
120 /*! General unspecified failure */
122 /*! Requested entity is dynamic */
124 /*! No or improper authorization */
126 /*! Duplicate request */
128 /*! Expired TTL */
130 /*! Need new session key to decode */
132 /*! Badly encrypted data */
134};
@ DUNDI_CAUSE_GENERAL
Definition: dundi.h:121
@ DUNDI_CAUSE_NEEDKEY
Definition: dundi.h:131
@ DUNDI_CAUSE_SUCCESS
Definition: dundi.h:119
@ DUNDI_CAUSE_DYNAMIC
Definition: dundi.h:123
@ DUNDI_CAUSE_DUPLICATE
Definition: dundi.h:127
@ DUNDI_CAUSE_NOAUTH
Definition: dundi.h:125
@ DUNDI_CAUSE_BADENCRYPT
Definition: dundi.h:133
@ DUNDI_CAUSE_TTL_EXPIRED
Definition: dundi.h:129

◆ anonymous enum

anonymous enum
Enumerator
DUNDI_PEER_PRIMARY 
DUNDI_PEER_SECONDARY 
DUNDI_PEER_UNAVAILABLE 
DUNDI_PEER_REGISTERED 
DUNDI_PEER_MOD_OUTBOUND 
DUNDI_PEER_MOD_INBOUND 
DUNDI_PEER_PCMOD_OUTBOUND 
DUNDI_PEER_PCMOD_INBOUND 

Definition at line 148 of file dundi.h.

148 {
149 DUNDI_PEER_PRIMARY = (1 << 0),
150 DUNDI_PEER_SECONDARY = (1 << 1),
151 DUNDI_PEER_UNAVAILABLE = (1 << 2),
152 DUNDI_PEER_REGISTERED = (1 << 3),
153 DUNDI_PEER_MOD_OUTBOUND = (1 << 4),
154 DUNDI_PEER_MOD_INBOUND = (1 << 5),
155 DUNDI_PEER_PCMOD_OUTBOUND = (1 << 6),
156 DUNDI_PEER_PCMOD_INBOUND = (1 << 7),
157};
@ DUNDI_PEER_REGISTERED
Definition: dundi.h:152
@ DUNDI_PEER_PCMOD_OUTBOUND
Definition: dundi.h:155
@ DUNDI_PEER_MOD_INBOUND
Definition: dundi.h:154
@ DUNDI_PEER_PRIMARY
Definition: dundi.h:149
@ DUNDI_PEER_SECONDARY
Definition: dundi.h:150
@ DUNDI_PEER_PCMOD_INBOUND
Definition: dundi.h:156
@ DUNDI_PEER_MOD_OUTBOUND
Definition: dundi.h:153
@ DUNDI_PEER_UNAVAILABLE
Definition: dundi.h:151

Function Documentation

◆ dundi_lookup()

int dundi_lookup ( struct dundi_result result,
int  maxret,
struct ast_channel chan,
const char *  dcontext,
const char *  number,
int  nocache 
)

Lookup the given number in the given dundi context. Lookup number in a given dundi context (if unspecified use e164), the given callerid (if specified) and return up to maxret results in the array specified.

Return values
thenumber of results found.
-1on a hangup of the channel.

Definition at line 3932 of file pbx_dundi.c.

3933{
3934 struct dundi_hint_metadata hmd;
3935 dundi_eid *avoid[1] = { NULL, };
3936 int direct[1] = { 0, };
3937 int expiration = dundi_cache_time;
3938 memset(&hmd, 0, sizeof(hmd));
3940 return dundi_lookup_internal(result, maxret, chan, dcontext, number, dundi_ttl, 0, &hmd, &expiration, cbypass, 0, NULL, avoid, direct);
3941}
static PGresult * result
Definition: cel_pgsql.c:84
static int dundi_ttl
Definition: pbx_dundi.c:194
static int dundi_cache_time
Definition: pbx_dundi.c:196
static int dundi_lookup_internal(struct dundi_result *result, int maxret, struct ast_channel *chan, const char *dcontext, const char *number, int ttl, int blockempty, struct dundi_hint_metadata *md, int *expiration, int cybpass, int modeselect, dundi_eid *skip, dundi_eid *avoid[], int direct[])
Definition: pbx_dundi.c:3830
#define NULL
Definition: resample.c:96
An Entity ID is essentially a MAC address, brief and unique.
Definition: utils.h:813
Number structure.
Definition: app_followme.c:154

References dundi_cache_time, DUNDI_HINT_DONT_ASK, DUNDI_HINT_UNAFFECTED, dundi_lookup_internal(), dundi_ttl, dundi_hint_metadata::flags, NULL, and result.

Referenced by dundi_do_lookup(), dundi_exec(), dundi_helper(), dundi_query_read(), and dundifunc_read().

◆ dundi_precache()

int dundi_precache ( const char *  dcontext,
const char *  number 
)

Pre-cache to push upstream peers.

Definition at line 4074 of file pbx_dundi.c.

4075{
4076 dundi_eid *avoid[1] = { NULL, };
4078}
static int dundi_precache_internal(const char *context, const char *number, int ttl, dundi_eid *avoids[])
Definition: pbx_dundi.c:4002

References voicemailpwcheck::context, dundi_precache_internal(), dundi_ttl, and NULL.

Referenced by dundi_do_precache(), and process_precache().

◆ dundi_query_eid()

int dundi_query_eid ( struct dundi_entity_info dei,
const char *  dcontext,
dundi_eid  eid 
)

Retrieve information on a specific EID.

Definition at line 4127 of file pbx_dundi.c.

4128{
4129 dundi_eid *avoid[1] = { NULL, };
4130 struct dundi_hint_metadata hmd;
4131 memset(&hmd, 0, sizeof(hmd));
4132 return dundi_query_eid_internal(dei, dcontext, &eid, &hmd, dundi_ttl, 0, avoid);
4133}
static int dundi_query_eid_internal(struct dundi_entity_info *dei, const char *dcontext, dundi_eid *eid, struct dundi_hint_metadata *hmd, int ttl, int blockempty, dundi_eid *avoid[])
Definition: pbx_dundi.c:4080

References dundi_query_eid_internal(), dundi_ttl, and NULL.

Referenced by dundi_do_query().