Thread: 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 |
From: Chris H. <ch...@as...> - 2007-03-21 15:24:42
|
Bruno Konik wrote: > Hello Martin, > > 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. How about originating to "Local/<exten>@context" as your channel? |
From: Bruno K. <bru...@un...> - 2007-03-21 15:44:33
|
Hello Chris, Do you mean that it would work for any kind of channel (SIP, zap, iax)? = Is the 'Local' a special keyword? Thanks, Bruno > -----Message d'origine----- > De : ast...@li...=20 > [mailto:ast...@li...] De=20 > la part de Chris Howard > Envoy=E9 : mercredi 21 mars 2007 16:21 > =C0 : ast...@li... > Objet : Re: [Asterisk-java-users] Association=20 > channel-extension/context >=20 > Bruno Konik wrote: > > Hello Martin, > > =20 > > thanks for your answer. I agree with you, * requires channel and=20 > > context but the next question is "how to get that information if we=20 > > don't have it?". If the application making the originate does know=20 > > only the extension is there a way to get the channel and context=20 > > associated to it. Using a command like "show dialplan" may work but=20 > > I'd like to know if there is a better way. >=20 > How about originating to "Local/<exten>@context" as your channel? >=20 > -------------------------------------------------------------- > ----------- > Take Surveys. Earn Cash. Influence the Future of IT Join=20 > SourceForge.net's Techsay panel and you'll get the chance to=20 > share your opinions on IT & business topics through brief=20 > surveys-and earn cash=20 > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge > &CID=3DDEVDEV > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >=20 > -------------------------------------------------------------- > ------------------------- > Orange vous informe que cet e-mail a ete controle par=20 > l'anti-virus mail.=20 > Aucun virus connu a ce jour par nos services n'a ete detecte. >=20 >=20 >=20 |
From: Chris H. <ch...@as...> - 2007-03-21 15:56:13
|
Bruno Konik wrote: > Hello Chris, > > Do you mean that it would work for any kind of channel (SIP, zap, iax)? Is the 'Local' a special keyword? > > Thanks, > > Bruno > If you have a context like: [somecontext] exten => 1234,1,Dial(SIP/joebob) exten => 1234,n,Hangup() exten => 1235,1,Dial(Zap/g1/14045551212) exten => 1235,n,Hangup() exten => 5555,1,VoiceMailMain(s${CALLERIDNUM}@${VM_CONTEXT}) exten => 5555,n,Hangup() exten => 6666,1,Playback(tt-monkeys); exten => 6666,n,Hangup() And you originate using Local/1234@somecontext then it will call SIP/joebob. If you originate to Local/1235@somecontext then it will dial out the g1 trunk to the number 14045551212 etc.... Chris |
From: Bruno K. <bru...@un...> - 2007-03-21 16:01:24
|
Good! I'll try this. This forces to know the context however but it is = acceptable! BTW I had missed http://www.voip-info.org/wiki/view/Asterisk+local+channels. Thanks Chris.=20 > -----Message d'origine----- > De : ast...@li...=20 > [mailto:ast...@li...] De=20 > la part de Chris Howard > Envoy=E9 : mercredi 21 mars 2007 16:52 > =C0 : ast...@li... > Objet : Re: [Asterisk-java-users] Association=20 > channel-extension/context >=20 > Bruno Konik wrote: > > Hello Chris, > > > > Do you mean that it would work for any kind of channel=20 > (SIP, zap, iax)? Is the 'Local' a special keyword? > > > > Thanks, > > > > Bruno > > =20 >=20 > If you have a context like: >=20 > [somecontext] > exten =3D> 1234,1,Dial(SIP/joebob) > exten =3D> 1234,n,Hangup() > exten =3D> 1235,1,Dial(Zap/g1/14045551212) exten =3D>=20 > 1235,n,Hangup() exten =3D>=20 > 5555,1,VoiceMailMain(s${CALLERIDNUM}@${VM_CONTEXT}) > exten =3D> 5555,n,Hangup() > exten =3D> 6666,1,Playback(tt-monkeys); > exten =3D> 6666,n,Hangup() >=20 > And you originate using Local/1234@somecontext then it will=20 > call SIP/joebob. If you originate to Local/1235@somecontext=20 > then it will dial out the g1 trunk to the number 14045551212 etc.... >=20 > Chris >=20 >=20 >=20 > -------------------------------------------------------------- > ----------- > Take Surveys. Earn Cash. Influence the Future of IT Join=20 > SourceForge.net's Techsay panel and you'll get the chance to=20 > share your opinions on IT & business topics through brief=20 > surveys-and earn cash=20 > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge > &CID=3DDEVDEV > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users >=20 > -------------------------------------------------------------- > ------------------------- > Orange vous informe que cet e-mail a ete controle par=20 > l'anti-virus mail.=20 > Aucun virus connu a ce jour par nos services n'a ete detecte. >=20 >=20 >=20 |