Open pergolafabio opened 1 year ago
I have seen a few instances of sending XML in SIP messages in the real world, but could you explain what benefit this would have? Also, what other messages would need XML in them? I'm just trying to think of a way that I could add this FR in and make sure it still looks nice.
Hey @tayler6000 , offcourse, my case is specific for Hikvision Hardware and Video Intercoms, they talk with a private SIP hik protocol, and the devices itself exchange information with XML data, the example above, thats for a trunk setting to register, if the REGXML is missing, the sip protocol doesnt allow the trunk in Asterisk to be registered...
Its because you are now working getting a release ready for HA, want we want to use your pyVoip then instead offcourse...
Other examples bellow, for the message header
MESSAGE sip:10010100000@192.168.0.70:5065 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.71:5060;rport;branch=z9hG4bK153267426
From: Embedded Net VIS <sip:10010110001@192.168.0.71>;tag=1873039053
To: <sip:10010100000@192.168.0.70:5065>
Call-ID: 1101016445
CSeq: 20 MESSAGE
Content-Type: text/xml
Max-Forwards: 70
User-Agent: eXosip/3.6.0
Content-Length: 269
<sipMsg>
<header>
<version>V2.0.0</version>
<msgId>b8e363ef</msgId>
<encrypt>false</encrypt>
<uri>/SIP/Query/OutdoorInfo</uri>
<from>
<deviceSN>XXXXX</deviceSN>
<ipAddr>192.168.0.71</ipAddr>
<phoneNo>10010110001</phoneNo>
</from>
</header>
<body>
</body>
</sipMsg>
MESSAGE sip:10010100000@192.168.0.70:5065 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.71:5060;rport;branch=z9hG4bK153267426
From: Embedded Net VIS <sip:10010110001@192.168.0.71>;tag=1873039053
To: <sip:10010100000@192.168.0.70:5065>
Call-ID: 1101016445
CSeq: 20 MESSAGE
Content-Type: text/xml
Max-Forwards: 70
User-Agent: eXosip/3.6.0
Content-Length: 269
<sipMsg>
<header>
<version>V2.0.0</version>
<msgId>b8e363ef</msgId>
<encrypt>false</encrypt>
<uri>/SIP/Query/OutdoorInfo</uri>
<from>
<deviceSN>XXXX</deviceSN>
<ipAddr>192.168.0.71</ipAddr>
<phoneNo>10010110001</phoneNo>
</from>
</header>
<body>
</body>
</sipMsg>
Thanks for the examples! PyVoIP recently gained additional support for receiving text/plain
and text/xml
messages in commit 8922a62. Since the merge of #100, basically, everything except registration is broken. But once I finish the VoIPSocket migration, you should be able to properly send and receive XML MESSAGE requests.
With HA's sponsorship of pyVoIP I can definitely add additional XML body requirements where necessary. I'd like to get pyVoIP 2.0.0 out relatively soon, and to do that I'd like to not overload it will too many feature requests since there are many bugs to solve at the moment. But this can definitely be a 2.1.0 priority!
Thx for this info, much appreciated!!! Will make a lot of users happy!
Hi, is it possible to make a feature request to send xml in the body register like example below?
Thnx in advance!!