Hi,
> The response I get is containing response=3D'Follows' but nothing seems=
> to follow. Launching the command through the CLI gives a correct
> result.
the correct snippet for sending a command action looks like this:
response =3D sendAction(new CommandAction(command));
if (!(response instanceof CommandResponse))
{
throw some exception here
}
return ((CommandResponse) response).getResult();
is this what you have?
> For information, my more general goal is to try to establish the type
> of channel given an extension. For example, suppose I have an
> extension 804, I would like to try 'sip show peer 804', if it fails
> then 'iax2 show peer 804'. Is is a good method or can I make it
> better?
If you don't know upfront whether the channel is a SIP or IAX channel
thats probably the only solution.
If you have a corresponding extension in the dialplan though, you could
also use Local/ channels.
Example
[default]
804 =3D> Dial(IAX2/804)
Then just use Local/804@default instead of IAX2/804.
Hope that helps,
Stefan
--=20
reuter network consulting
Neusser Str. 110
50760 Koeln
Germany
Telefon: +49 221 1305699-0
Telefax: +49 221 1305699-90
E-Mail: ste...@re...
Jabber: ste...@re...
Steuernummern 215/5140/1791 USt-IdNr. DE220701760
|