< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [reSIProcate] SUBSCRIBE callback?


It really helps to dig through the code a little. : ) 

Check out the ServerSubscription methods that are accessible from the
ServerSubscriptionHandle. A couple of notes:
1.  202 accepts are sent via ServerSubscription accept() 
2.  notifies are send via ServerSubscription update(..)

For the 489 - did you add a ServerSubscriptionHandler to the application
that is receiving the subscribe requests?

Scott

> -----Original Message-----
> From: Dien Ba Quang [mailto:dienbaquang@xxxxxxxxx]
> Sent: Friday, March 16, 2007 11:46 AM
> To: Scott Godin
> Cc: resiprocate-devel@xxxxxxxxxxxxxxxxxxxx
> Subject: Re: [reSIProcate] SUBSCRIBE callback?
> 
> 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@xxxxxxxxxxxx> wrote:
> > Did you call addSupportedMimeType on your Master profile?
> >
> > Scott
> >
> > -----Original Message-----
> > From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxxx
> > [mailto:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxxx] On Behalf Of
> Dien Ba
> > Quang
> > Sent: March-15-07 6:10 PM
> > To: resiprocate-devel@xxxxxxxxxxxxxxxxxxxx
> > 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@xxxxxxxxxxxxxxxxxxxx
> > https://list.resiprocate.org/mailman/listinfo/resiprocate-devel
> >
> >