Chan.connect

From Yate Documentation
(Difference between revisions)
Jump to: navigation, search
(Example)
(Example)
 
Line 48: Line 48:
 
'''See also'''
 
'''See also'''
  
* chan.locate
+
* [[chan.locate]]

Latest revision as of 12:26, 21 January 2013

chan.connect is a message sent by a module requesting the connection of two channels.

[edit] Parameters

id
Specify channel id of leg A
targetid
Specify the channel id of leg B
id_peer
If true, field id will be treated as peer, false - as id
targetid_peer
Boolean value indicating to connect the corresponding peer. Defaults to false. If true, field id will be treated as peer of provided call id, false - as id itself.

[edit] Return

A module processing this message should return true if the connection succeedded.

[edit] Example

Initiate call to two persons and connect them to each other

%%>message:0xb59f6f11.327305252:1326117799:call.execute::callto=dumb/:target=person1

Answer:

%%<message:0xb59f6f11.327305252:true:call.execute::callto=dumb/:target=person1:id=dumb/47:peerid=sip/134:targetid=sip/134


Call to person2, connect it to dumb channel:

%%>message:0xb59f6f11.327305253:1326117800:call.execute::callto=dumb/:target=person2

Answer:

%%<message:0xb59f6f11.327305253:true:call.execute::callto=dumb/:target=person2:id=dumb/48:peerid=sip/135:targetid=sip/135


Next, connect them:

%%>message:0xb59f6f11.327305254:1326117801:chan.connect::id=sip/134:targetid=sip/135

Or:

%%>message:0xb59f6f11.327305254:1326117801:chan.connect::id=dumb/47:id_peer=true:targetid=dumb/48:targetid_peer=true


See also

Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers