Checking if SIP Phone is pickedup before Forward Skype Call

Hi there,

I have looked through the Forum, but die not find an answer to my problem. So I hope you can help me.

What I am trying to do is:

  • Receive incoming Skype Call and let the caller hear some music
  • Meanwhile I check to which Agent he should be forwarded (with external Java programm and not using the Asterisk Routing) This is because I try to integrate Skype into an existing Software which is already handling the routing.
  • Once I have an agent selected I want to ring him and only if he accepts the call the Skype-Call should be forwarded to him
  • If he does not accept the Call, I need to know an look for another Agent. But the Skype call should not notice anything.

Right now my dialplan looks like this for the incoming Skype Calls:
[skypein2]
exten => test_kat_200,1,answer()
exten => test_kat_200,n(JESUS),MP3Player(/var/lib/asterisk/sounds/custom/Jesus.mp3)
exten => test_kat_200,n,GoTo(JESUS)
exten => test_kat_200,n,hangup()

Then I tried to originate a call to the agent and wait for the response.

My questions now are following:

  • can I originate a call to the agent and directly link the skype-channel to it. So that if the agent picks up he is connected to the Skype caller? And what will happen if does not pick up the phone.
  • Or is it better to originate the agent to a dummy extension and once the channel is established bridge this channel to the skype channel?

Would really appreciate any help or hints.
Thanks
Henning

It would help to know why you have rejected Asterisk Queues.

You can park the caller and make the music be music on hold and then Originate to the agent with ParkedCall as the application to run.

Thanks David for your answer.

The reason I can not use the Asterisk routing is because I am writing a plugin for an existing program. This program is handling mails and chats. So it has its own routing process. Thus I have to check the status of the agents in this program. e.g. if a agent has a chat he is not available for calls and the other way round. And there are many more parameters to check before selecting an agent. That is why I did not use Queues, because I can not dynamically assign agents to a queue, right?

Your hint with the parked calls looks promising. But how can I originate a call to the selected agent and bridge the Skype-Channel with the one I originated? The Agent has to pick up the phone before the Skype caller is connected to him. So I cant use “redirect”.

Sorry if I dont have a good understanding of all features yet. This is part of my final exams and I just startd in April. So thanks for your patience.