Hi,
It is successful,my IAD can be used by two different phone .Many thanks for your support!
I have changed my code by following above your post and I also modified a bit in the callflow_h/smallmgc_h_messagebuilder.cpp.
- Code: Select all
std::string SmallMGC_HMessageBuilder::buildModifyModem(Poco::UInt32 transactionId,std::string contextId, std::string physical, std::string ephemeral, std::string remoteDescriptor, Poco::UInt32 eventId)
{
//std::string addrstr = "[10.1.2.50]:2944";
std::stringstream ss;
ss << "!/1 " << SmallMGC_HMessageBuilder::mgcMessageHeader << " T=" << transactionId << "{"
<< "C=" << contextId << "{"
<< "MF=" << physical
<< "{M{O{MO=SR,RV=OFF,RG=OFF,tdmc/ec=OFF}},E=" << eventId
<< "{ctyp/dtone,al/on{strict=exact},al/of{strict=exact},al/fl},SG{}},MF=" << ephemeral
<< "{M{TS{ctype/calltype=DATA},O{MO=SR,RV=OFF,RG=OFF}," << remoteDescriptor << "}}}}\n"; <---------remove the last ","
return ss.str();
}
If I don't remove "," in the code,I can not call another phone and have the error "401{"Syntax Error: Line 1, Column 192"}" .
I will continue learn Megaco by your "Smallmgc",if I meet some problems,I will keep in touch with you.
Thank you!