Click to call - Queue

Hello everyone.
I am trying to make this code work with a Queue.
I got a code like this and it works nice when I call sip trunk:

        fputs($connectSocket, "Action: Login\r\n");
        fputs($connectSocket, "Events: off\r\n");
        fputs($connectSocket, "UserName: " . $user . "\r\n");
        fputs($connectSocket, "Secret: " . $pass . "\r\n\r\n");*/
        fputs($connectSocket, "Action: originate\r\n");

\*******************************************
\insted of sip SIP/510 I want to put it to a Queue and I can’t figure it out???
fputs($connectSocket, “Channel: SIP/510\r\n”);
\*******************************************
fputs($connectSocket, “WaitTime: $strWaitTime\r\n”);
fputs($connectSocket, “CallerId: $strCallerId\r\n”);
fputs($connectSocket, “Timeout: 20000\r\n”);
fputs($connectSocket, “Exten: $someNumber\r\n”);
fputs($connectSocket, “Context: $strContext\r\n”);
fputs($connectSocket, “Priority: $strPriority\r\n\r\n”);
It might be imposible but I put here anyway.
If you can sudjust anything thanks.

From the good help at:
http://forums.digium.com/viewtopic.php?f=1&t=76470&sid=995d93234db5eacbbe2550c65292d3da

We changed this:
fputs($connectSocket, “Channel: SIP/510\r\n”);
To:
fputs($connectSocket,“Local/$queueExtension@from-internal\r\n”);
and it worked!!!

Hope this helps :slight_smile:

I guess the question wasn’t clear:
This line as it works:
fputs($connectSocket, “Channel: SIP/510\r\n”);
However I need the channel to be a queue (and not SIP/510)
fputs($connectSocket,
“Queue: 2600\r\n”);
“Queue: sales@2600\r\n”);
“Exten: 2600\r\n”);
“Exten: salse@2600\r\n”);
I can’t figure what to put here.
I think I have tried it all and it doesn’t work.
If you have any ideas??
Please help.