[Asterisk-Dev] Authenticated NOTIFY support working -- sorta
Charles Duffy
cduffy at spamcop.net
Tue May 3 03:16:30 MST 2005
To persuede NOTIFY events to authenticate, I found the following to be
necessary:
- Stop unnecessarily reassigning the call ID on outgoing notify events
- Set the SIP_OUTGOING flag on outgoing notify events
- Mirror (pretty much) the SIP_INVITE logic in
chan_sip.c:handle_response()
The above changes result in authenticated NOTIFY messages. Unfortunetly,
the copies of these messages produced by do_proxy_auth() no longer have
the extra headers added in sip_notify(), so they don't actually *do*
anything useful. To add these headers back in, I added a new member to
sip_pvt, notifyType, and assign it the name of the notify type in use.
Then, in transmit_invite(), I look at notifyType and if it's set use the
same logic as sip_notify() to add back in the missing headers.
Except that whenever this code is enabled, the phone (a Sipura SPA-841)
responds with another 401, as opposed to the 200 it returns when the
relevant code is commented out. This has me somewhat confused.
The work-in-progress patch, with the bits to add the user-requested
headers to the authenticated packet commented out (well, surrounded in a
#if 0...#endif block), is attached. Comments/suggestions very much
appreciated.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: chan_sip.c.patch
Type: text/x-patch
Size: 4034 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20050503/5d328921/chan_sip.c.bin
More information about the asterisk-dev
mailing list