Posted: Tue Apr 08, 2003 7:03 pm Post subject: [Asterisk-Dev] SIP: Problem in recent Contact changes - resu
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
You've been moving things around in the chan_sip.c code, with the result
that you are now calling get_destination(), which needs the
sip_pvt->context, before you call check_user which copies the context from
the sip_user struct over into sip_pvt.
The result is that numbers dialled are always in the global context rather
than the context for the particular peer.
For instance:
if (!p->lastinvite) {
/* Get destination right away */
gotdest = get_destination(p, NULL);
build_contact(p);
/* Handle authentication if this is our first invite */
res = check_user(p, req, cmd, e, 1);
if (res) {
if (res < 0) {
ast_log(LOG_NOTICE, "Failed to authenticate user %s\n", get_header(req, "From"));
p->needdestroy = 1;
}
return 0;
}
Similar problem when handling SUBSCRIBE.
Here's a patch that seems to fix but I'm not quite sure what your
objective was with moving things around and my patch makes the code a bit
less than elegant.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum