< Previous by Date | Date Index | Next by Date > |
Thread Index | Next in Thread > |
Hi, In my application, I would like log file contains the CallID of Sip Message. When I aact as a UAC, no problem, the CallID is known very early. But, when I act as a UAS, I make a lot of things before building the Invite and getting a CallID. So I would like to compute my own callid and pass it to invite message after building. The problem is that DUM Dialog is registered in mDialogSetMap wilt old CallID. Therefore, all responses are rejected because no dialogset is found :-( Is there a way to use a custom built CallID in sip messages ? makeUACDialogSet uses my own AppDialogSet I provided. But DUM build it's own DialogSet which gets its id from creator which does not have the new callid It would be fine if DialogSet was build by AppDialogSet. i.e. add a virtual AppDialogSet::makeNewDialogSet(BaseCreator *, DialogUsageManager &) { return new DialogSet(creator, *this) ; } Which could be derived in virtual MyAppDialogSet::makeNewDialogSet(BaseCreator *, DialogUsageManager &) { // Make any modification on creator message ... creator->getLastRequest()->header(h_CallID).value() = mycallid ; // Build my own dialog set // mId in dialog set will be the right one now ! return new MyDialogSet(creator, dum) ; } Here is Dum original 00463 { 00464 if (mDumShutdownHandler) 00465 { 00466 throw DumException("Cannot create new sessions when DUM is shutting down.", __FILE__, __LINE__); 00467 } 00468 00469 if (appDs == 0) 00470 { 00471 appDs = new AppDialogSet(*this); 00472 } - 00473 DialogSet* ds = new DialogSet(creator, *this); + 00473 DialogSet *ds = appDs->makeNewDialogSet(creator, *this) ; 00474 00475 appDs->mDialogSet = ds; 00476 ds->mAppDialogSet = appDs; 00477 00478 StackLog ( << "************* Adding DialogSet ***************" ); 00479 StackLog ( << "Before: " << Inserter(mDialogSetMap) ); 00480 mDialogSetMap[ds->getId()] = ds; 00481 StackLog ( << "After: " << Inserter(mDialogSetMap) ); 00482 return ds; 00483 }am I missing something ? Aurelien |