Chan.masquerade
From Yate Documentation
(Difference between revisions)
(→Parameters) |
(→Parameters) |
||
Line 28: | Line 28: | ||
H323: chan.dtmf, userData=sip channel, return TRUE | H323: chan.dtmf, userData=sip channel, return TRUE | ||
(forwards DTMF) | (forwards DTMF) | ||
− | + | ||
Let's say you have to call legs connected: A(id=sip/1) and B(id=sip/2). | Let's say you have to call legs connected: A(id=sip/1) and B(id=sip/2). | ||
Call leg A might be a script that does something and then | Call leg A might be a script that does something and then |
Revision as of 15:29, 8 October 2012
chan.masquerade is used when a module wants to send a message that should appear as sent from another module/channel. This is used typically by RTP to send DTMF messages apparently from the channel the RTP stream belongs to.
Sender emits the chan.masquerade message which is modified (but not acknowledged) early (at a high priority in the chain) by the object that accepts to let masquerade. The message continues to flow trough the hub until its final destination.
Parameters
message
- Name of the message that will be masqueraded
id
- Id of channel that will seem to have sent the message
Since this message masks another one, the other parameters that one needs to add depend of the message type.
For example:
(generated by RTP with owner=sip/123) RTP: chan.masquerade, userData=NULL message=chan.dtmf id=sip/123 (processed at level 10) SIP: chan.dtmf, userData=this, return FALSE id=sip/123 peerid=h323/456 (processed at level 100) H323: chan.dtmf, userData=sip channel, return TRUE (forwards DTMF) Let's say you have to call legs connected: A(id=sip/1) and B(id=sip/2). Call leg A might be a script that does something and then you wish B to be connected to a C. So a call from B to C should be made without B noticing this. So A will send a chan.masquerade with the following params: message="call.execute"; id="sip/2"; //(notice that it has B's id), destination="sip/C@ip:port";
In Yate 0.9.x all channel objects derived from Channel implement chan.masquerade by default.