Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Presence Contact header #290

Closed
chusov opened this issue Aug 6, 2014 · 5 comments
Closed

Presence Contact header #290

chusov opened this issue Aug 6, 2014 · 5 comments
Assignees
Labels
Milestone

Comments

@chusov
Copy link

chusov commented Aug 6, 2014

Duplicate transport in Contact header when "server_address" not set for presence module.

Example:

T 172.25.37.161:5060 -> 172.25.16.1:60517 [AP]
NOTIFY sip:294ee820-3268-11e3-8c04-005056be2a54@172.25.16.1:5060;transport=tcp
SIP/2.0.
Via: SIP/2.0/TCP 172.25.37.161:5060;branch=z9hG4bKa382.218fc614.0.
To: <sip:294ee820-3268-11e3-8c04-005056be2a54@domain>;tag=1807462242.
From: <sip:1400@domain>;tag=3f1e5c171f2b7ab605dc3178f992bbc2-8d7f.
CSeq: 1 NOTIFY.
Call-ID: 1717825494-5060-2@BHC.CF.BG.B.
Max-Forwards: 70.
Content-Length: 145.
User-Agent: OpenSIPS (1.10.1-tls (x86_64/linux)).
Event: dialog.
Contact: <sip:172.25.37.161:5060;transport=tcp;transport=tcp>.
Subscription-State: active;expires=300.
Content-Type: application/dialog-info+xml.
.
<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="0" state="full" entity="sip:1400@domain"/>

T 172.25.16.1:60517 -> 172.25.37.161:5060 [AP]
SIP/2.0 481 Subscription Does Not Exist.
Via: SIP/2.0/TCP 172.25.37.161:5060;branch=z9hG4bKa382.218fc614.0.
From: <sip:1400@domain>;tag=3f1e5c171f2b7ab605dc3178f992bbc2-8d7f.
To: <sip:294ee820-3268-11e3-8c04-005056be2a54@domain>;tag=1807462242.
Call-ID: 1717825494-5060-2@BHC.CF.BG.B.
CSeq: 1 NOTIFY.
Supported: replaces, path, timer.
User-Agent: Grandstream GXP2124 1.0.6.7.
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO,
REFER, UPDATE, MESSAGE.
Content-Length: 0.
@bogdan-iancu bogdan-iancu added this to the 1.11 milestone Aug 7, 2014
@bogdan-iancu bogdan-iancu self-assigned this Aug 7, 2014
@bogdan-iancu
Copy link
Member

Hi @chusov - there is a bit of inconsistency here. IF you use "server_address" param the presence will try to add the "transport" param to it when using it(it does not expect you to populate it). IF you do not use it, the internal contact is build from time 0 with the transport, so when using it, it will add again.
So, in first case (with param), the "transport" is not part of the internal contact string, in the second case it is. And the module adds "trasport" all the time when sendin it out (based on teh chosen interface).

The logical way will be to avoid keeping the "trasport" string in the internal contact and have it added only when using it....

@bogdan-iancu
Copy link
Member

Try this patch please:
https://gist.github.com/bogdan-iancu/a470dc5e74c073994b08
And let me know if works ok in both cases.

@chusov
Copy link
Author

chusov commented Aug 25, 2014

Witch patch Opensips not duplicate transport:

T 172.25.16.1:35074 -> 172.25.37.161:5060 [AP]
SUBSCRIBE sip:1400@domain SIP/2.0.
Via: SIP/2.0/TCP 172.25.16.1:5060;branch=z9hG4bK818215314;rport;alias.
From: <sip:294ee820-3268-11e3-8c04-005056be2a54@domain>;tag=1915679720.
To: <sip:1400@domain>.
Call-ID: 227034201-5060-3@BHC.CF.BG.B.
CSeq: 20010 SUBSCRIBE.
Contact: <sip:294ee820-3268-11e3-8c04-005056be2a54@172.25.16.1:5060;transport=tcp>.
X-Grandstream-PBX: true.
Max-Forwards: 70.
User-Agent: Grandstream GXP2124 1.0.5.32.
Expires: 300.
Supported: replaces, path, timer, eventlist.
Event: dialog.
Accept: application/dialog-info+xml,multipart/related,application/rlmi+xml.
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE.
Content-Length: 0.

I cant set "server_address" because have UDP (port - 5060) and TLS(port - 5061) client, if I not set port in "server_address" Opensips send contact "Contact: sip:172.25.37.161;transport=tcp." If set to 5060 begin problem witch TLS client.

Sorry for English.

@bogdan-iancu
Copy link
Member

@chusov , I do not understand - do you still have a problem ? if YES, could you point it out please .

@chusov
Copy link
Author

chusov commented Sep 4, 2014

No problem resolved with path.
Thanks.

@chusov chusov closed this as completed Sep 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants