Re: PSTN call
Stephan Steiner <[email protected]> Thu, 31 Mar 2005 00:06:42 -0700
| Newsgroups | gmane.comp.java.sun.jtapi |
|---|---|
| Message-ID | <LISTSERV%[email protected]> |
What you're trying is not going to work for reasons the previous replier
outlined.
Here's a makecall function that works:
public CiscoCall makeCall(String originatorDN, String callDN)
{
try
{
CiscoCall call = (CiscoCall)provider.createCall();
Address sourceDN = provider.getAddress(originatorDN);
Terminal term = sourceDN.getTerminals()[0];
call.connect(term, sourceDN, callDN);
return call;
}
catch (Exception e)
{
print("catched the following error during makecall " + e.getMessage());
return null;
}
}
originatorDN is the DN of the IP phone from which the call is to be made,
callDN is the DN to be called. It can be either an internal DN or an
external number (don't forget to append a 0/9 or whichever prefix you need
to get an outside line). You cannot get an Address object for an external
number.. it might not even exist after all and your Call Manager obviously
doesn't know or care about external addresses.
===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff JTAPI-INTEREST". For general help, send email to
[email protected] and include in the body of the message "help".