General Category > Yate users hangout place

No Ringtone Custom Queue In Handle

<< < (2/5) > >>

ganapathi:
I meant to say am calling handler on every call only to pass some value like Queue name, partycallid etc. If i used global one then have no idea to get those value, where value is not available on every messages to utilize.

Is there any API functionalities available to push value and access it whenever required throughout the messages.

marian:
Please specify your intention.
What is the working case?
What parameter are you talking about and where do you want to store them?
Remember: chan.connected is automatically sent by a Channel when connected to another one.

ganapathi:
As i need an billid, incoming channel ID(sig/1),queue_name and other some other value that's should necessary to validate some condition and append into another message.

For Ex :
Once call.answered message received from sip(sip/1) then need to emit chan.connect with sip/1 with sig/1. Where i can id for sip/1 but i need to get value of sig/1 through some variable. Like queue_name on chan.disconnected message need to emit new message to queue module.

And Also original billid which calls to queue module is not passing into Queue_Out Module, so need value to append to sip outleg.

Current Call.answered handler :

--- Quote ---if (msg.getValue("id") == m_partycallid) {
            msg.setParam("reason", "pickup");
            return true;
}
else if (msg.getValue("targetid") == m_ourcallid)
{
   msg.setParam("targetid", m_partycallid);
   Message* mc = new Message("chan.connect");
   mc->copyParam(msg, "id");
   mc->addParam("targetid", m_partycallid);
   Engine::dispatch(mc);
   return true;
}
return false;


--- End quote ---

Value want to store :

* billid
* queue_name
* partycallid
* ..
Want to Store into Cache Memory/ Temp File Storage/ :
Store Like : JSON Object/Object List/Single Variable

Just for scenario ,It would be great if values are stored into ObjectList from Queue Module and access it on Queue_Outgoing Module.

marian:
When you are handling (parking) an incoming call you known its id.
When you are executing an outbound call you have the outgoing call id in call.execute when message returns from dispatch.
Just remember them.
You may track them as needed.

You may use chan.locate to obtain channel pointer.
You may obtain billid using API. See Channel documentation.

ganapathi:
To get Billid with channel ID :

--- Code: ---Message m("chan.locate");
m.addParam("id", m_partycallid);
if (Engine::dispatch(m)) {
Channel* c = new Channel(dest,m,true)
c->billid();
}

--- End code ---

like this ?.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version