My problem is the following.
I want:
to be called by A
read a code from A (ex. 15334#)
retrieve the phone number of B from a database with the code readed from A
call B
once A is in communication with B, hangup after 3 seconds
For now, it works, BUT when I hangup (after 3 seconds), communication between A and B is closed.
A and B are external numbers.
How to hangup server without closing communication between A & B?
Thanks a lot,
Doing it way you did it called "bridged call". So when you close bridge,it hangup. You need transfer call. Unfortanly that require transfer support from provider side. For sure no one of providers will do this for you for zero cost.
Provider can organize that using other asterisk(at provider side) or special hardware pbx or other hardware/softswitch solution. If provider can do that feature for you, provider will inform you how to do. For example some provider allow do transfer using flash+dtmf command(on analog lines).
Related
I’m researching options to upgrade a legacy TCP socket protocol where either end can initiate messages/transactions and am intrigued by gRPC as an option.
My criteria are:
supports authentication
layer 7 (vs layer 4 for current implementation)
supports TLS
From what I’ve read so far, gRPC has all this. However, it’s not clear to me that it has peer-peer capabilities. The behavior I’m interested in is:
client can request info and send commands to server (supported)
server can send updates to client on its own initiative (supported)
#1 can happen while #2 is happening
It seems to me that defining a server stream for case #2 would work. It’d basically be a
// use case 2
rpc SubscribeToEvents(EventsSubscriptionRequest) returns (stream EventDescriptor);
But would I also be able to use case #1 while #2 was active?
// use case 1
rpc GetValue(ValueRequest) returns (ValueResponse);
Thanks in advance for your help and advice.
Assuming you use a multi-threaded implementation, it's possible for both #1 and #2 concurrently.
However, you describe a client-server scenario not peer-peer; the client must initiate both #1 (unary) and #2 (streaming) RPCs.
True peer-peer would have the endpoints implement client and server such that either peer could initiate (unary and|or streaming) RPCs against another.
You could have both sides be both client and server, as the other answer suggests. But if you are okay with having the client be the one to initiate the connection and the stream, you could use a single bidirectional stream between the two sides. Once the client initiates the stream, the client and server can each send messages on the stream whenever they want to.
I have a toll free DID that users call to access my PBX service on an Asterisk box. The problem is; this DID comes only with a single channel so the system can only receive one call at a time. My initial idea was to simply get the caller ID of the incoming call, disconnect the caller and issue an automated call back to him to proceed with the call. This would free up my toll free number but could be confusing for the caller of course and also, there are issues where the caller calls from behind an extension. The best solution would be to somehow seemlessly switch the call to an outgoing trunk to reconnect the caller but now using my SIP trunk.
My question is; is there a way to do this in Asterisk (or I guess, does SIP somehow allow such operation)?
Thanks in advance.
That is called "callback".
Yes, you can do it. No, asterisk have no internal way do that and no way do it not noticable for user.
I am looking this use case scenario for Asterisk. I am using v 1.8 running a Centos 6.4 Linux distribution.
1.An outbound call is initiated via Asterisk
2.Both the internal extension as well as the outbound call-phone starts to ring.
The first person to pick up (either the internal extension or outbound call-phone) will
hear the a pre recorded message to hold as the call is being connected to the other user
i.e: If outbound call-phone picks up first then he will be asked to hold the line while the call is being connected to internal-phone user.
Any inputs?
My suggestion is almost the same but a little different:
Setup a dynamic meetme room changing the only-person message to "please hold..."
Setup booth calls at same time to destination numbers and set the originate command application parameter as meetme
Create 2 calls
http://www.voip-info.org/wiki/view/Asterisk+auto-dial+out
After connect use bridge command or conference room.
http://www.voip-info.org/wiki/view/Asterisk+cmd+MeetMe
Default Asterisk configuration (only sip.conf changes).
I use call files for calling and I need to hangup after first ring while every dial.
WaitTime: 4 seconds doesn't work sometimes, since it's counting from the beginning (connect to SIP provider etc) and the client doesn't even receive the call.
00359894000001.call
Channel: SIP/flowroute/00359894000001
Extension: 00359894000001
WaitTime: 4
There are no way predict connection time and count how much ring was at called side. Ring create by endpoing equipment, you have no control/info about it.
If the connection time for the SIP provider etc is constant you should just check what it is and add it to your 4 seconds.
i am using two m/c A and B, both are having same vxworks image as well as hardware. but only change is application. suppose M/c A is server and M/c B is client. while communication over ethernet client M/c is not able send the data. it's getting stuck send() and task state will be Pend.
wState = send(vstCCEUSerSocket.wCCEUAcceptFD,(char* )vstCCEUAppTask.rgubyCCEUTxPkt,sizeof(vstCCEUAppTask.rgubyCCEUTxPkt),0);
/*logMsg("\nTrmtd = %d\t",wState);*/
if(wState == ERROR)
{
perror("write");
Close the Fd
}
From the VxWorks OS Libraries API Reference
Page 497/498 you can find info about the connect() but there's also a connectWithTimeout()
Page 1203/1204 you might find some interesting items for TCP sockets. For example the KEEP_ALIVE
If you rely on a quick connection time, and you want to keep control you can combine connectWithTimeout with the keep alive.
It can take another day for me to recall old code to check how I ever solved this in one of my projects.
VxWorks 5.5 Network Programmers Guide - Stream Sockets