Re: [Asterisk-java-users] Association channel-extension/context
Brought to you by:
srt
From: Bruno K. <bru...@un...> - 2007-03-21 13:22:29
|
Hello Martin, =20 thanks for your answer. I agree with you, * requires channel and context = but the next question is "how to get that information if we don't have it?". If the application making the originate does know only = the extension is there a way to get the channel and context associated to it. Using a command like "show dialplan" may work but I'd = like to know if there is a better way. =20 thanks, =20 Bruno _____ =20 De : Martin Smith [mailto:ma...@be...]=20 Envoy=E9 : mercredi 21 mars 2007 14:16 =C0 : Bruno KONIK Objet : RE: [Asterisk-java-users] Association channel-extension/context Hi Bruno, =20 I took a look at = http://www.voip-info.org/wiki/view/Asterisk+Manager+API+Action+Originate = and http://svn.digium.com/view/asterisk/tags/1.4.2/main/manager.c?rev=3D59053= <http://svn.digium.com/view/asterisk/tags/1.4.2/main/manager.c?rev=3D5905= 3&view=3Dmarkup> &view=3Dmarkup and it appears that Asterisk requires and immediately uses the context and channel. =20 An extension can ONLY exist within a context, so that information should = be readily available somewhere, if I'm not mistaken. Without a context, I don't think Asterisk can uniquely identify the = extension. As for a channel, your extension (for example a softphone with SIP) will exist on a SIP channel. If you have the = extension, you have the rest of these details -- without them, the extension is indeterminate, I think. =20 Each device has a channel. If you're doing out on a zap device, your = channel is "Zap/n" where n is the channel number on the zap device. If you're dialing a sip destination, you'll use "Sip/<extension = #>". =20 Does that help? Martin Smith, Systems Developer ma...@be... Bureau of Economic and Business Research University of Florida (352) 392-0171 Ext. 221=20 =20 _____ =20 From: ast...@li... = [mailto:ast...@li...] On Behalf Of Bruno KONIK Sent: Wednesday, March 21, 2007 8:10 AM To: ast...@li... Subject: [Asterisk-java-users] Association channel-extension/context Hello all, I would like to make an OriginateAction with knowing only the extension = which will make the call (the calling extension) and extension which will be called. I don't know the channel neither the = context of the calling extension. Yet I would like to know if it is possible to get that association from a manager action or command = (I mean the association of an extension with the channel and context to initiate calls).=20 For example, "show dialplan" may give information (it forces to parse = the dialplan and I imagine it may be tricky if macros or variables are used) but I would like to know if there is a better way to = do this.=20 Thanks for your help, Bruno Konik - uniGone |