[SIPForum-discussion] sip registration and invite keys to lookup phone state?

Dean Hiller dean at xsoftware.biz
Sun Nov 2 16:11:57 UTC 2008


Looking up all the state for a sip transaction can currently be done in our
system just by using hashtable.get(transactionId);.  This has been working
great.  Now, though, we have state that is
associated between the register and the invite.  What is the "key" or
multiple valued key that
I would use to look up state

I was thinking something like new Key(userName, proxyNameOrIp) or something
like that.  Basically,
what is the key info out of the sip register message and the sip invite
message that I can use to
lookup the state of the phone(on the client side and on the server side).

At the same time I would like to change the caller id in the invite message
going out(this means XXXXXX
can no longer be used as part of the key-and that is what we were doing
before....ooops........(state could not
be found now which is a problem for changing the state of the phone)....

REGISTER sip:69.64.95.185 SIP/2.0
Call-ID: 887284f4de2ec64ebc0180db8cf1362e at fastdragon
CSeq: 1 REGISTER
From: "Rawwrrr" <sip:6001 at 69.64.95.185 <sip%3A6001 at 69.64.95.185>
>;tag=a18fdf43-1df0-4943-9ffe-5e67bd1a59a1
To: "Rawwrrr" <sip:6001 at 69.64.95.185 <sip%3A6001 at 69.64.95.185>>
Via: SIP/2.0/UDP 10.0.1.191:5058
;branch=z9hG4bK-24696dcd-82c6-470d-be81-46014720dda6
Max-Forwards: 70
Contact: "Rawwrrr" <sip:6001 at 10.0.1.191:5058>
Expires: 3600
Allow: INVITE, ACK, CANCEL, BYE, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0

INVITE sip:6000 at 69.64.95.185 <sip%3A6000 at 69.64.95.185> SIP/2.0
Call-ID: 58860dae2ae9a24e8b5600dd2d0ba728 at fastdragon
CSeq: 1 INVITE
From: "XXXXXXX" <sip:XXXXXXXX at 69.64.95.185 <sip%3AXXXXXXXX at 69.64.95.185>
>;tag=881d954e-084b-4035-9eba-1e31573567f1
To: <sip:6000 at 69.64.95.185 <sip%3A6000 at 69.64.95.185>>
Via: SIP/2.0/UDP 10.0.1.191:5058
;branch=z9hG4bK-0476cd29-e59d-4da0-950b-01aa3b057417;rport
Max-Forwards: 70
Contact: <sip:10.0.1.191:5058>
Allow: INVITE, ACK, CANCEL, BYE, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0

What should the key I use to store and lookup state be?  Our system is
designed so it very very easy to change this
key to 2 or 3 items from the invite message and 2 or 3 items in the register
message.  all we have to know is what that
"key" is.  Any ideas here?

NOTE: above is a phone 6001 who registers and then tries to make a call as
XXXXXX to extension 6000.  the XXXXX is changed the caller id we would like
to display but this now screws up the "key" we were using to map this invite
to which phone it went with.

Not only this, but we need to know the key that should be formed when we
receive a register, invite or invite response, etc. etc. to map those all to
the same exact phone.  It seems to me sip made this part a pain in the
butt.  I wish they had a phone id that could be in every message.  That
would have made life much easier.  Anyways, what are the keys for all of
these messages?
thanks,
Dean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sipforum.org/pipermail/discussion/attachments/20081102/ae0dfde8/attachment-0002.html>


More information about the discussion mailing list