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

[reSIProcate] can't get callback of SUBSCRIBE



i can't get callback for SUBCRIBE (client) or NOTIFY for SUBCRIBE....  from
ClientSubscriptionHandler
my code given below

//set profile
m_pProfile->addSupportedMethod(REFER);
m_pProfile->addSupportedMethod(NOTIFY);
m_pProfile->addSupportedMethod(SUBSCRIBE);
m_pProfile->validateAcceptEnabled() = false;
m_pProfile->validateContentEnabled() = false;
m_pProfile->addSupportedMimeType(NOTIFY, Pidf::getStaticType());
m_pProfile->addSupportedMimeType(NOTIFY,Mime("application",
"simple-message-summary"));

//set callback handler
p_clientDum->setClientRegistrationHandler(p_clientHandler);
p_clientDum->setInviteSessionHandler(p_clientHandler);
p_clientDum->addClientSubscriptionHandler("refer", p_clientHandler);
p_clientDum->addClientSubscriptionHandler(Symbols::Presence,
p_clientHandler);
p_clientDum->addClientSubscriptionHandler(Symbols::Required,
p_clientHandler);
p_clientDum->addClientSubscriptionHandler(Symbols::Optional,
p_clientHandler);

//send Subscription
CSIPAppDialogSet *m_pADS = new CSIPAppDialogSet(*(p_clientDum),
"UAC(SUBSCRIBE)");
SipMessage SubscribeMessage = p_clientDum->makeSubscription(ServerAor,
mevent, exp_time, m_pADS);

SubscribeMessage.header(h_Accepts).push_back( Mime( "application",
"simple-message-summary") );

SubscribeMessage.header(h_Event).value() = "presence";
m_pClient->p_clientDum->send(SubscribeMessage);