Chan.masquerade

From Yate Documentation
Revision as of 18:16, 18 January 2013 by Dana (Talk | contribs)

Jump to: navigation, search

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.

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";


See also

Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers