Chan.masquerade
From Yate Documentation
(Difference between revisions)
(→Parameters) |
(→Example) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | '''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. | + | '''chan.masquerade''' is used when a module wants to send a message that should appear as sent from another module/channel.<br> |
+ | 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. | + | 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.<br> |
+ | The message continues to flow trough the hub until its final destination. | ||
=== Parameters === | === Parameters === | ||
Line 29: | Line 31: | ||
(forwards DTMF) | (forwards DTMF) | ||
− | Let's say you have | + | Let's say you have two 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 | ||
you wish B to be connected to a C. | you wish B to be connected to a C. | ||
Line 37: | Line 39: | ||
message="call.execute"; | message="call.execute"; | ||
id="sip/2"; //(notice that it has B's id), | id="sip/2"; //(notice that it has B's id), | ||
− | + | callto="sip/C@ip:port"; | |
+ | |||
+ | |||
+ | '''See also''' | ||
+ | |||
+ | * [[chan.notify]] |
Latest revision as of 10:26, 14 February 2014
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.
[edit] 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.
[edit] 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 two 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), callto="sip/C@ip:port";
See also