SUBSCRIBE to spigate.de

C(
Carsten (Tropby)
Sun, Jun 5, 2016 5:21 PM

Hello,

I try to develop a VOIP-Client that should work with sipgate.de.

Doing Calls wasn't the problem, because I found some good examples.

But now I got a real problem..

Sipgate.de supports BLF with SUBSCRIBE/NOTIFY. But I cannot make it work.

My SNOM - Phone (D765) is working fine with it.

I tried to setup the BLF with the following code:

VOIPBuddy buddy;

pj::BuddyConfig cfg;

cfg.uri = QString("<sip: <sip:%22%20+%20number%20+%20%22@sipgate.de> " +

number + "@sipgate.de>").toStdString();

cfg.subscribe = true;



try

{

    buddy.create( (pj::Account&)*this, cfg );

    buddy.subscribePresence(true);

}

catch(pj::Error& err)

{

    qDebug() << "Error: Buddy Add/Create" << err.reason.data();

}

I think the Problem is in the SIP-Messages. Please see the difference
between SNOM and PJSIP:

SNOM:

=======

SUBSCRIBE sip:35@presenced06.service.sipgate.net:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.85:5060;branch=z9hG4bK-7p729i1u1gpy;rport
Route: sip:217.10.68.147;lr;ftag=ytzz3erynw
Route: sip:172.20.40.6;lr
From: <sip: username@sipgate.de
mailto:username@sipgate.de%3e;tag=ytzz3erynw >;tag=ytzz3erynw
To: sip:35@sipgate.de;user=phone;tag=432f4c16-d0bb-4ba2-8
Call-ID: 3134363sdsdsdvsd43634313038363131393432-qyyq2xbr6rdp
CSeq: 1332 SUBSCRIBE
Max-Forwards: 16
User-Agent: snomD765/8.7.5.35
Contact: sip:username@192.168.0.85:5060;line=s6lte8jp;reg-id=1
Event: dialog
Accept: application/dialog-info+xml
Expires: 3600
Content-Length: 0

PJSIP:

======

SUBSCRIBE sip:76@sipgate.de SIP/2.0

Via: SIP/2.0/UDP
95.223.131.132:5060;rport;branch=z9hG4bKPj66af338e574b484fbdb1b40a83510f44

Max-Forwards: 70

From: sip:username@sipgate.de;tag=1188f22c5b7947a88ece2f0dd4bfa5af

To: sip:76@sipgate.de

Contact: sip:username@95.223.131.132:5060;ob

Call-ID: 067deca142cb47a78asdasd0456c46777748d9

CSeq: 6183 SUBSCRIBE

Event: presence

Expires: 0

Supported: replaces, 100rel, timer, norefersub

Accept: application/pidf+xml, application/xpidf+xml

Allow-Events: presence, message-summary, refer

Content-Length: 0

I hope you can help me!

Kind regards

Carsten


Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus

Hello, I try to develop a VOIP-Client that should work with sipgate.de. Doing Calls wasn't the problem, because I found some good examples. But now I got a real problem.. Sipgate.de supports BLF with SUBSCRIBE/NOTIFY. But I cannot make it work. My SNOM - Phone (D765) is working fine with it. I tried to setup the BLF with the following code: VOIPBuddy buddy; pj::BuddyConfig cfg; cfg.uri = QString("<sip: <sip:%22%20+%20number%20+%20%22@sipgate.de> " + number + "@sipgate.de>").toStdString(); cfg.subscribe = true; try { buddy.create( (pj::Account&)*this, cfg ); buddy.subscribePresence(true); } catch(pj::Error& err) { qDebug() << "Error: Buddy Add/Create" << err.reason.data(); } I think the Problem is in the SIP-Messages. Please see the difference between SNOM and PJSIP: SNOM: ======= SUBSCRIBE sip:35@presenced06.service.sipgate.net:5060 SIP/2.0 Via: SIP/2.0/UDP 192.168.0.85:5060;branch=z9hG4bK-7p729i1u1gpy;rport Route: <sip:217.10.68.147;lr;ftag=ytzz3erynw> Route: <sip:172.20.40.6;lr> From: <sip: username@sipgate.de <mailto:username@sipgate.de%3e;tag=ytzz3erynw> >;tag=ytzz3erynw To: <sip:35@sipgate.de;user=phone>;tag=432f4c16-d0bb-4ba2-8 Call-ID: 3134363sdsdsdvsd43634313038363131393432-qyyq2xbr6rdp CSeq: 1332 SUBSCRIBE Max-Forwards: 16 User-Agent: snomD765/8.7.5.35 Contact: <sip:username@192.168.0.85:5060;line=s6lte8jp>;reg-id=1 Event: dialog Accept: application/dialog-info+xml Expires: 3600 Content-Length: 0 PJSIP: ====== SUBSCRIBE sip:76@sipgate.de SIP/2.0 Via: SIP/2.0/UDP 95.223.131.132:5060;rport;branch=z9hG4bKPj66af338e574b484fbdb1b40a83510f44 Max-Forwards: 70 From: sip:username@sipgate.de;tag=1188f22c5b7947a88ece2f0dd4bfa5af To: <sip:76@sipgate.de> Contact: <sip:username@95.223.131.132:5060;ob> Call-ID: 067deca142cb47a78asdasd0456c46777748d9 CSeq: 6183 SUBSCRIBE Event: presence Expires: 0 Supported: replaces, 100rel, timer, norefersub Accept: application/pidf+xml, application/xpidf+xml Allow-Events: presence, message-summary, refer Content-Length: 0 I hope you can help me! Kind regards Carsten --- Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. https://www.avast.com/antivirus