BelledonneCommunications / linphone-sdk

Mirror for linphone-sdk (https://gitlab.linphone.org/BC/public/linphone-sdk.git)
GNU Affero General Public License v3.0
105 stars 81 forks source link

Send XML header on register #204

Closed pergolafabio closed 1 year ago

pergolafabio commented 2 years ago

Hi,

I have an intercom system (doorbell), connected to some indoor panels, seems the indoor panels are linked to each other using a SIP protocol, i tried to simulate it with linphone, but i get a 501 not allowed, probably because i'm missing some headers, as you can see below , did a trace how the registration is done with indoor panels Seems there is some extra XML as an header i think? Can i add it also to linphone with this method : proxyConfig.setCustomHeader

thnx , appreciated

10000000002@192.168.0.72:5060;line=39b237d1561ac46>
Authorization: Digest username="10000000002", realm="xxxx", nonce="710ae2f3adf7446b6ea068ed6cede929", uri="sip:10000000002@192.168.0.71:5065", response="78e1b60cb438905bdaf010e680d06734", algorithm=MD5, opaque="9c77d2882f5d8f3fb72f307e3da4d76d"
Content-Type: text/xml
Max-Forwards: 70
User-Agent: eXosip/3.6.0
Expires: 900
Content-Length:   165

<regXML>
<version>V2.0.0</version>
<regDevName>Room 2</regDevName>
<regDevSerial>XXXXXX</regDevSerial>
<regDevMacAddr>xxx</regDevMacAddr>
</regXML>
REGISTER sip:10000000002@192.168.0.71:5065 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.72:5060;rport;branch=z9hG4bK870856495
From: Room 2 <sip:10000000002@192.168.0.72>;tag=588337480
To: Room 2 <sip:10000000002@192.168.0.72>
Call-ID: 1549082696
CSeq: 2 REGISTER
Contact: <sip:10000000002@192.168.0.72:5060;line=39b237d1561ac46>
Authorization: Digest username="10000000002", realm="xxx", nonce="710ae2f3adf7446b6ea068ed6cede929", uri="sip:10000000002@192.168.0.71:5065", response="78e1b60cb438905bdaf010e680d06734", algorithm=MD5, opaque="9c77d2882f5d8f3fb72f307e3da4d76d"
Content-Type: text/xml
Max-Forwards: 70
User-Agent: eXosip/3.6.0
Expires: 900
Content-Length:   165

<regXML>
<version>V2.0.0</version>
<regDevName>Room 2</regDevName>
<regDevSerial>XXXXX</regDevSerial>
<regDevMacAddr>xxxx</regDevMacAddr>
</regXML>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.72:5060;rport=5060;branch=z9hG4bK870856495
From: Room 2 <sip:10000000002@192.168.0.72>;tag=588337480
To: Room 2 <sip:10000000002@192.168.0.72>;tag=111615696
Call-ID: 1549082696
CSeq: 2 REGISTER
Content-Type: text/xml
User-Agent: sipServer
Date: Thu, 16 Sep 2021 17:46:27 GMT
Content-Length:    70

<version>V2.0.0</version>
<random>r4yRs3RdrvLb3I7hUO+qDQ==</random>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.72:5060;rport=5060;branch=z9hG4bK870856495
From: Room 2 <sip:10000000002@192.168.0.72>;tag=588337480
To: Room 2 <sip:10000000002@192.168.0.72>;tag=111615696
Call-ID: 1549082696
CSeq: 2 REGISTER
Content-Type: text/xml
User-Agent: sipServer
Date: Thu, 16 Sep 2021 17:46:27 GMT
Content-Length:    70

<version>V2.0.0</version>
<random>r4yRs3RdrvLb3I7hUO+qDQ==</random>
Viish commented 2 years ago

Hi,

Sorry but no that's not possible with our API. If that's something you want please contact us through our website and we'll send you a quotation for the feature development.

Cheers,

pergolafabio commented 2 years ago

ok, thnx for feedback