Author Topic: Copy All Parameters from Handled message  (Read 3146 times)

ganapathi

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
    • Optimal Đ¡asual Dating - Authentic Damsels
Copy All Parameters from Handled message
« on: September 03, 2018, 08:07:43 AM »
Hi

i just want to copy all the parameters from dispatched message into new message, so that i can emit this message without missing any parameters.

 Message* m = new Message("call.route");
 m->copyParam(msg,"billid");
 m->copyParam(msg,"peerid");
 if (Engine::dispatch(m))
 {
  Message* notify = new Message("chan.masquerade");
  notify->addParam("id", msg.getParam(YSTRING("id"))->c_str());
  notify->addParam("message", "call.execute");
  notify->copyParams(m,notify); // Like this i need to copy all the paramaters from dispatched message to new message.
 }

By any loop or any default function available. ?

Kindly help me out

Ioana Stanciu

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Re: Copy All Parameters from Handled message
« Reply #1 on: September 05, 2018, 06:20:44 AM »
notify->copyParams(*m) is what you are looking for.

Please see: http://yate.null.ro/docs/api/TelEngine__NamedList.html#ref17