[reSIProcate] SUBSCRIBE callback?

Dien Ba Quang dienbaquang at gmail.com
Fri Mar 16 10:45:43 CDT 2007


Hi Scott,
Thank you for your help. Now I can get the SUBSCRIBE call back works,
but I still have a problems with SUBSCRIBE messages:
Below is the code that I added to my soft phone:
	profile->addSupportedMethod(REFER);
	profile->addSupportedMethod(NOTIFY);
	profile->addSupportedMethod(SUBSCRIBE);
	profile->validateAcceptEnabled() = false;
	profile->validateContentEnabled() = false;
	profile->addSupportedMimeType(NOTIFY, Pidf::getStaticType());
	profile->addSupportedMimeType(NOTIFY,Mime("application",
"simple-message-summary"));
.......................

When my soft phone received a new SUBSCRIBE message, it calls the
function void onNewSubscription(ClientSubscriptionHandle is, const
SipMessage& notify) but how can I create a 202 Accepted and NOTIFY
message to response?
Now, what I saw in the Ethereal program is the message: "489 Event
Package Not Supported" was sent to subscriber.

Thank you very much,
DBQ.

On 3/15/07, Scott Godin <slgodin at icescape.com> wrote:
> Did you call addSupportedMimeType on your Master profile?
>
> Scott
>
> -----Original Message-----
> From: resiprocate-devel-bounces at list.resiprocate.org
> [mailto:resiprocate-devel-bounces at list.resiprocate.org] On Behalf Of Dien Ba
> Quang
> Sent: March-15-07 6:10 PM
> To: resiprocate-devel at list.resiprocate.org
> Subject: [reSIProcate] SUBSCRIBE callback?
>
> Hi,
> I'm a new member of reSiprocate, I'm now developing a SIP softphone
> using resiprocate as a SIP stack. I have problems with SUBSCRIBE call
> back:
> I can't get callback for SUBCRIBE (client) , below is my code:
>
>         clientDum->addClientSubscriptionHandler("presence",&subListener);
>         Data mevent("presence");
>         int exp_time = 400;
>         testAppDialogSet *uac = new testAppDialogSet(*(clientDum),
> "UAC(SUBSCRIBE)");
>         SharedPtr<SipMessage> SubscribeMessage =
> clientDum->makeSubscription(uasAor, mevent, exp_time, uac);
>         //SubscribeMessage.header(h_Accepts).push_back( Mime( "application",
> "simple-message-summary") );
>
>         //SubscribeMessage.header(h_Event).value() = "presence";
>         clientDum->send(SubscribeMessage);
>
> Did I do something wrong? I used Ethereal to capture the packets:
>           My Softphone                       SIPX
> X-lite soft phone
> F1:      -----SUBSCRIBE ---------------->  | ----------------------------->
> F2:        <--------------------------------------   |
> <------------------------- 202 Accepted
> F3:
> <------------------------------------------------------------------------
> NOTIFY
> F4:       405 Method not allowed -------------------------------------->
>
> Any help appreciated,
>
> DBQ.
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel at list.resiprocate.org
> https://list.resiprocate.org/mailman/listinfo/resiprocate-devel
>
>



More information about the resiprocate-devel mailing list