Hello, it is again me =)

Now I'm developing a callcenter module which will implements ACD feature.
So, I should maintain SIP signals.

Here is main part of my classes:
Interfaces:
class CallCenterFactory: public AmSessionFactory, public
AmSessionEventHandler
{
public:
  CallCenterFactory(const string& _app_name);
        ...

  bool onSipReply (const AmSipReply& rep);
  bool onSipEvent (AmSipEvent* ev);
  static CallCenterFactory* instance;
};


class CallCenterCallerDialog: public AmB2ABCallerSession
{
  AmB2ABCallerSession * myCaller;
        ...
public:
  CallCenterCallerDialog(const string& filename);

  void onInvite(const AmSipRequest& req);
  void process(AmEvent* event);
  void onSessionStart(const AmSipRequest& req);
};



Realizations:

CallCenterFactory* CallCenterFactory::instance = NULL;
EXPORT_SESSION_FACTORY(CallCenterFactory,MOD_NAME);

CallCenterFactory::CallCenterFactory(const string& _app_name)
  : AmSessionFactory(_app_name)
{
    instance = this;
};

 
bool CallCenterFactory::onSipReply (const AmSipReply& rep)
{
    DBG("onSipReply\n");
    return false;
};


bool CallCenterFactory::onSipEvent (AmSipEvent* ev)
{
    DBG("onSipEvent\n");
    return false;
};



void CallCenterCallerDialog::onSessionStart(const AmSipRequest& req)
{
        ...
    myCaller = new AmB2ABCallerSession();
    myCaller->connectCallee("sip:[email protected]",
"sip:[email protected]", "sip:[email protected]",
"sip:[email protected]");
    myCaller->addHandler(CallCenterFactory::instance);
};


But CallCenterFactory::onSipReply and CallCenterFactory::onSipEvent didn't
call. Why?
How can I react on SIP events (Trying, Ringing, OK, BYE, etc) having just
instance of AmSession (AmB2BASession) class? Or there is no another way that
writing my own class deriving from AmB2ABSession?



Thank you!


[email protected]
www.oyster-telecom.ru

 

 



_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems

Reply via email to