|
|
|
@ -981,6 +981,7 @@ struct sip_auth {
|
|
|
|
|
/* realtime flags */
|
|
|
|
|
#define SIP_PAGE2_RTCACHEFRIENDS (1 << 0) /*!< GP: Should we keep RT objects in memory for extended time? */
|
|
|
|
|
#define SIP_PAGE2_RTAUTOCLEAR (1 << 2) /*!< GP: Should we clean memory from peers after expiry? */
|
|
|
|
|
#define SIP_PAGE2_HAVEPEERCONTEXT (1 << 3) /*< Are we associated with a configured peer context? */
|
|
|
|
|
/* Space for addition of other realtime flags in the future */
|
|
|
|
|
#define SIP_PAGE2_STATECHANGEQUEUE (1 << 9) /*!< D: Unsent state pending change exists */
|
|
|
|
|
|
|
|
|
@ -1013,7 +1014,7 @@ struct sip_auth {
|
|
|
|
|
(SIP_PAGE2_ALLOWSUBSCRIBE | SIP_PAGE2_ALLOWOVERLAP | SIP_PAGE2_IGNORESDPVERSION | \
|
|
|
|
|
SIP_PAGE2_VIDEOSUPPORT | SIP_PAGE2_T38SUPPORT | SIP_PAGE2_RFC2833_COMPENSATE | \
|
|
|
|
|
SIP_PAGE2_BUGGY_MWI | SIP_PAGE2_TEXTSUPPORT | SIP_PAGE2_UDPTL_DESTINATION | \
|
|
|
|
|
SIP_PAGE2_FAX_DETECT)
|
|
|
|
|
SIP_PAGE2_FAX_DETECT | SIP_PAGE2_HAVEPEERCONTEXT)
|
|
|
|
|
|
|
|
|
|
/*@}*/
|
|
|
|
|
|
|
|
|
@ -11973,8 +11974,9 @@ static int get_destination(struct sip_pvt *p, struct sip_request *oreq)
|
|
|
|
|
return -2;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/* If we have a context defined, overwrite the original context */
|
|
|
|
|
if (!ast_strlen_zero(domain_context))
|
|
|
|
|
/* If we don't have a peer (i.e. we're a guest call),
|
|
|
|
|
* overwrite the original context */
|
|
|
|
|
if (!ast_test_flag(&p->flags[1], SIP_PAGE2_HAVEPEERCONTEXT) && !ast_strlen_zero(domain_context))
|
|
|
|
|
ast_string_field_set(p, context, domain_context);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -21930,6 +21932,7 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str
|
|
|
|
|
ast_copy_string(peer->cid_num, v->value, sizeof(peer->cid_num));
|
|
|
|
|
} else if (!strcasecmp(v->name, "context")) {
|
|
|
|
|
ast_copy_string(peer->context, v->value, sizeof(peer->context));
|
|
|
|
|
ast_set_flag(&peer->flags[1], SIP_PAGE2_HAVEPEERCONTEXT);
|
|
|
|
|
} else if (!strcasecmp(v->name, "subscribecontext")) {
|
|
|
|
|
ast_copy_string(peer->subscribecontext, v->value, sizeof(peer->subscribecontext));
|
|
|
|
|
} else if (!strcasecmp(v->name, "fromdomain")) {
|
|
|
|
|