Author |
|
will Junior
Joined: February 07 2005 Location: Canada Posts: 48
|
Posted: October 19 2005 at 7:08pm | IP Logged
|
|
|
Dear support,
when there is an incoming call, the status becomes "InComingCallStart" then transits to "InComingCallConnected" status if the "HOOKOff" even happens, then if "ONHOOK" event happens, the status transits to "ONHOOK" status.
Then the question is: in "InComingCallStart" status, the softphone is ringing waiting to be picked up, but the user wants to reject the incomingcall, so how to make the status transit from "InComingCallStart" to "ONHOOK" directly and at the same time let the caller on the other side hear the tone as if the call is picked up and hung up immediatly.
We tried to use "terminatecall()" to achive this, but apparently, it works only after a connection has been established.
Thanks to your attention.
Will
|
Back to Top |
|
|
support Administrator
Joined: January 26 2005 Location: United States Posts: 1666
|
Posted: October 20 2005 at 9:21am | IP Logged
|
|
|
Hi Will,
I think we understand your question. What you want is a single API procedure that will immeditely kill an incoming phone call, the incoming phone ring and place the phone line into the "on hook" state. Is that correct?
If this is what you want to do, there is no single API proc that will do this. However, can't you just answer the incoming phone call and then immediately hang up? That should produce the same result. As a matter of fact, when you want your application to be placed into the "Ingore incoming phone calls" mode, do the following:
1)
Turn off incoming phone call ring sounds by calling the EnableIncomingPhoneRing() API proc (specify an enable parameter value of FALSE).
2)
When an incoming phone call is detected, answer the call when the VOIP Media Engine sends your app the SipOkToAnswerCall event. Answer the call by calling the GoOffHook() API proc.
3)
When the phone line state enters the SipInCall state, immediately terminate the phone call by calling the TerminateCall() API proc. The phone line will go back to the "on hook" state.
If the above is not exactly what you want to do, consider the following:
If you want a phone line to reject an incoming phone call you should call the BusyOutLine() API procedure. This way the VOIP Media engine will ignore the incoming phone call and signal to the far end that initiaited the call a proper SIP status.
Generally speaking: If a phone line is not "busied out", and the media engine receives an incoming call and starts its incoming ring sound, the only way to stop the incoming phone ringing is to answer the call and then hang up immediately.
Here is some additional information regarding the sequence of events that are sent to your application by the VOIP Media Engine for incoming phone calls:
Code:
Receiving an incoming call. The caller hangs up before we
answer the call:
---------------------------------------------------------
SipIncomingCallStart
Indicates that a call is starting
SipSendTrying
The VOIP Media Engine transmits a "100 Trying"
SipSendRinging
The VOIP Media Engine transmits a "180 Ringing"
SipStartIncomingRing
Incoming phone ring starts when this state is reached.
SipOkToAnswerCall
When this state is reached, the application can
call the GoOffHook() API proc to answer the call.
SipCallCanceled
The far end UA who initiated the call, hung up.
SipOnHook
The VOIP Media Engine phone line goes back to the
"on hook" state and is ready for antoher call.
Receiving an incoming call. The call is answered by the receiving end.
The call is then terminated by the initiating user agent (UA):
---------------------------------------------------------
SipIncomingCallStart
Indicates that a call is starting
SipSendTrying
The VOIP Media Engine transmits a "100 Trying"
SipSendRinging
The VOIP Media Engine transmits a "180 Ringing"
SipStartIncomingRing
Incoming phone ring starts when this state is reached.
SipOkToAnswerCall
When this state is reached, the application can
call the GoOffHook() API proc to answer the call.
The application calls the GoOffHook() API proc to
answer the incoming call.
SipAnsweringCall
The VOIP Media Engine indicates that it is answering
the call.
SipSend200Ok
The VOIP Media Engine transmits a "200 OK" for the
original INVITE"
SipReceivedInviteAck
The VOIP Media Engine receives an INVITE ACK from
the initiator.
SipIncomingCallConnected
Signals that the SIP session is connected and complete.
SipInCall
Indicates that the call is alive and media is flowing.
The whole time the call is in this state, the call
endpoints can talk as log as they want.
SipByeReceived
The far end has terminated the call and the VOIP Media
Engine has received a SIP BYE message.
SipSendByeAck
The VOIP Media Engine sends an ACK to the other UA.
SipCallComplete
The VOIP Media Engine tells the applicationn the
call is over.
SipOnHook
The VOIP Media Engine phone line goes back to the
"on hook" state and is ready for antoher call.
Receiving an incoming call. The call is answered by the receiving end.
The call is then terminated by the receiving user agent (UA):
---------------------------------------------------------
SipIncomingCallStart
Indicates that a call is starting
SipSendTrying
The VOIP Media Engine transmits a "100 Trying"
SipSendRinging
The VOIP Media Engine transmits a "180 Ringing"
SipStartIncomingRing
incoming phone ring starts when this state is reached.
SipOkToAnswerCall
When this state is reached, the application can
call the GoOffHook() API proc to answer the call.
The application calls the GoOffHook() API proc to
answer the incoming call.
SipAnsweringCall
The VOIP Media Engine indicates that it is answering
the call.
SipSend200Ok
The VOIP Media Engine transmits a "200 OK" for the
original INVITE"
SipReceivedInviteAck
The VOIP Media Engine receives an INVITE ACK from
the initiator.
SipIncomingCallConnected
Signals that the SIP session is connected and complete.
SipInCall
Indicates that the call is alive and media is flowing.
The whole time the call is in this state, the call endpoints
can talk as log as they want.
SipSendBye
The call is terminated by the app when it calls the
TerminateCall() API proc. the VOIP Media Engine transmits
a SIP BYE mesage at this point.
SipReceivedByeAck
The VOIP Media Engine receives a BYE ACK.
SipCallComplete
The VOIP Media Engine tells the applicationn the
call is over.
SipOnHook
The VOIP Media Engine phone line goes back to the
"on hook" state and is ready for antoher call.
|
|
|
If this information fails to answer your questions, repost as required,
Support
|
Back to Top |
|
|
will Junior
Joined: February 07 2005 Location: Canada Posts: 48
|
Posted: November 02 2005 at 2:04pm | IP Logged
|
|
|
hi, support,
thanks to your reply.
we cannot make the call connected then hangup immediatly to fake a rejection, because once a connection is set there will be charge laid on customers. so we decided to fake 'OnHook' on the callee side but leave the caller side ringing and direct the callee to voice mail to leave voice messages.
Here is another question:
when a caller is making a call, he can hear the phone on the callee side start ringing, but at this moment if the caller hangs up the phone, he can still hear the ring on the other side and could not completely hang up, this leads to the caller is directed to voice mail of the other side and be charged for that which is not expected.
this does not happen when a call connection has already been set up. so this means it is difficult to make the softphone to go back to 'OnHook' status while it is in 'ringing the other side' status.
is there any way to 'cancel' making call?
One more issue is: the engine is very powerful for building different services, for example it can be used to build softphone and IVR etc. but this brings a negative consequence---> the DLL size is very big, and sometimes the user of the engine actually is using part of it. This is just my personal suggestion, maybe the DLL can be divided into smaller parts for different development purposes which can meet the marketing requirements better.
regards,
will
|
Back to Top |
|
|
lsadmin Administrator
Joined: October 01 2003 Location: United States Posts: 19
|
Posted: November 02 2005 at 3:02pm | IP Logged
|
|
|
Will,
Item 1:
Good solution.
Item 2:
We read your information and are a bit confused by the description. Sorry. If you cannot “completely hang up” a call you initiate, then there is a bug somewhere. Whenever you initiate a call, it can be “canceled” at any time. Execute the TerminateCall() API proc in your code to do this – anytime after you start a call. If there is a bug in the Media Engine, gather specific information and send it to us so that we may investigate further. SIP logs are ideal.
Item 3:
DLL size – No plans to make the VOIP Media Engine DLL smaller. We try very hard to keep it as small as possible for obvious reasons (for down loading soft phones, etc). We would be interested in your thoughts as to why it needs to be smaller. Give examples of why it needs to be smaller. What size would be acceptable? What is your application that demands a smaller DLL size? Let’s face it, The VOIP Media Engine is a software product. If there is a need for a “skinny” version, we will create it if there is demand for it.
We like to receive customer requests, gripes and “wish list items”. Feel free to post or email us anytime regarding your thoughts. We need your help to make this product as flexible as possible. With all the VOIP variations we face, this is often difficult – but not impossible.
Repost as required.
Support
|
Back to Top |
|
|
will Junior
Joined: February 07 2005 Location: Canada Posts: 48
|
Posted: November 04 2005 at 1:35pm | IP Logged
|
|
|
hi, support,
the item 2 has been solved, the caller can hangup completly. Then there comes another problem: when the caller uses the softphone to initiated a call to a cell phone, then after the caller hangup, the cell phone still rings for several times and soemtimes it leads to the cell phone's voice mail box, it seems somehow the cell phone is still receving the "ring" message, but this never happens when the callee is a conventional desktop phone. I am not sure it this falls into the support scope, but any ideas are very appreciated!
In addition to this above, could you please tell me something like the following for outgoing calls:
you replied with this for incoming calls
/************************************************/
SipSendTrying
The VOIP Media Engine transmits a "100 Trying"
SipSendRinging
The VOIP Media Engine transmits a "180 Ringing"
/************************************************/
we tried the SipSendTrying on outcoming calls when a call is initiated, but could not catch the SipSendTrying msg, so we think maybe there is another set of msg specially for outgoing calls,
regards,
will
|
Back to Top |
|
|
support Administrator
Joined: January 26 2005 Location: United States Posts: 1666
|
Posted: November 05 2005 at 6:55am | IP Logged
|
|
|
Will,
You are correct, the SipSendTrying event is sent to an application when the app receives an incoming call.
For outbound calls:
The VOIP Media Engine version you have (5.10) does not relay received provisional SIP message information received to the application (i.e. received “100 Trying” or “180 Ringing”). For more info on provisional SIP message types, take a look at SIP RFC 3261, sections “21.1 Provisional 1xx” through “21.1.5 183 Session Progress”.
The next product release will include additional support for provisional events for outbound calls. For example, when making an out bound call, applications will receive 1xx series events from the Media Engine. If the destination of the call transmits back SIP messages for “100 Trying” or “180 Ringing”, the application will receive the following events:
SipReceived100Trying
SipReceived180Ringing
However, like I mentioned above, version 5.10 does not indicate to the application these received provisional responses. Watch the web site for the upcoming 5.11 release of the VIOP Media Engine. It will be available in a fully functional trial version too.
Have a good weekend,
Support
|
Back to Top |
|
|
|
|