C2D on a website!!

Discussion in 'General' started by DjBac, Oct 14, 2009.

  1. DjBac

    Joined:
    May 20, 2009
    Messages:
    137
    Likes Received:
    0
    I was wondering if there is a way to put a code in my website so that when a visitor clicks on a button it would act as C2D, so that we could talk right away?
     
  2. dwells

    Joined:
    Sep 29, 2009
    Messages:
    127
    Likes Received:
    0
    I'm sure there is a way. I have a dynamic phone book that reads active users, then display a C2D link. This would work if there where other numbers other than internal extensions listed[long distance numbers].

    It's PHP based, and works with all our Polycom phones. Similar code can be manipulated to invoke a call back to whoever click on the link, but you would need to get their phone number from them first, interactively from the website... Then you need to invoke the call back module and inject their number to call back, THEN as that's happening, the system rings a group, or single extension. You can also plant a permenet-ish cookie so they would never need to do it again...Then it's a single click to call after the first time.

    So in short I don't think there is a SIMPLE SINGLE CLICK to CALL, for someone outside to invoke your phone to ring from a website.

    Any other thoughts anyone?
     
  3. ramoncio

    Joined:
    May 12, 2010
    Messages:
    1,663
    Likes Received:
    0
    I have this php script working fine for C2D:

    http://nerdvittles.com/index.php?p=168

    Right now I send the incoming call to a ring group with a couple of sip extensions and my mobile number, but you can send it to a IVR or wherever you want.
    And you should also customize the page look, of course.
     
  4. DjBac

    Joined:
    May 20, 2009
    Messages:
    137
    Likes Received:
    0
    Just what I wanted!!!:D

    If I place it on my website's server then how should I define my asterisk server? I give its dyn.IP, should I give a port too? Redirect a certain port to the asterisk server?
     
  5. dwells

    Joined:
    Sep 29, 2009
    Messages:
    127
    Likes Received:
    0
    if it's on your * server the ip should be "localhost" 127.0.0.1.

    $strHost = "127.0.0.1";
     
  6. DjBac

    Joined:
    May 20, 2009
    Messages:
    137
    Likes Received:
    0
    I understand that, but as I mention above, If I put it on my website's server?
     
  7. dwells

    Joined:
    Sep 29, 2009
    Messages:
    127
    Likes Received:
    0
    Sorry you're right, I misread.

    If it's inside you network, give private dyn IP <done.>
    if outside (or NATED) give public IP and port forward your router with 5038/BOTH.

    I cannot confirm this would work, as I run the script and the webpage displaying it all local.
     
  8. DjBac

    Joined:
    May 20, 2009
    Messages:
    137
    Likes Received:
    0
    PERFECT!!!!!!! :D

    Works like a charm!!

    Thanx!
     
  9. DjBac

    Joined:
    May 20, 2009
    Messages:
    137
    Likes Received:
    0
    Is it possible to make it call a queue intead of an extension or an external number?

    Even better, would it be possible that when it makes the call and the person who wanted to call me answers the phone, to have an announcement and then the queue? Or directly the queue but it should start the announcement only after the other party picks up!!

    Could this be done?:D
     
  10. dwells

    Joined:
    Sep 29, 2009
    Messages:
    127
    Likes Received:
    0
    Sure, why not...set up a queue and static that number into a variable from the C2C script(?number=xxx)So it always calls that number. As for announcements, make one and use it in your call queue, or have the announcement send the caller to the queue.

    And depending on what site they clicked on you can play with different queue weights (make one more of a priority) which bumps those "important callers" to the front of the line...

    The sky's the limit.
     
  11. DjBac

    Joined:
    May 20, 2009
    Messages:
    137
    Likes Received:
    0
    I don't think I understood ur suggestion!! :(

    I am a but confused, could you explain it to me please!! :D
     
  12. dwells

    Joined:
    Sep 29, 2009
    Messages:
    127
    Likes Received:
    0
    Basically yes it's possible.
    If you read through the link that ramoncio put up, you'll find some tips and trick to it.

    Change: $strChannel = "SIP/XXX"; Where XXX is your queue number. It's also in the file above this variable, on usage of channels.

    change it to something like this: $strChannel = "local/1NXXNXXXXXX@from-internal" ; where 1NXXNXXXXXX is your cell phone...

    than play with your queue settings, to get the desired results for announcements etc.

    better? helping???
     
  13. DjBac

    Joined:
    May 20, 2009
    Messages:
    137
    Likes Received:
    0
    Hi!

    I tried SIP/XXX where XXX=queue number but nothing happened!

    How is it supposed If i put it to ring the queue, then to ring the desired number?
     
  14. dwells

    Joined:
    Sep 29, 2009
    Messages:
    127
    Likes Received:
    0
    try it without the "SIP/" Just the number. I just forced the link via C?P and it worked right into our Tech Support queue.

    c2c.php?number=XXX <--- XXX = Queue#

    My setup is slightly different from yours, but this worked local for me.

    Also that means forget about the local/...@from/// stuff. just put the number that follows your dialplan when XXX is. To call a cell phone just put the number in in a way asterisk can route it for your setup. 1NXXNXXXXXX would work for me.
     
  15. DjBac

    Joined:
    May 20, 2009
    Messages:
    137
    Likes Received:
    0
    I think it worked!! :D

    I tried Local/XXXX@mycontext!!! :D
     
  16. DjBac

    Joined:
    May 20, 2009
    Messages:
    137
    Likes Received:
    0
    What I realized is that when I set it to call a queue, then the join announcement starts playing, even before the other party picks up the phone. Is there anything to fix this?


    Something else that occured!

    How can I make it go to a time condition instead of a queue?
     
  17. dwells

    Joined:
    Sep 29, 2009
    Messages:
    127
    Likes Received:
    0
    The only thing that I can think if at the moment is send them to an IVR that requires them to push 1 to continue kind of thing, then send them to the time condition.

    otherwise the playing before pickup, would need a timer, and that may not work either since you don't know when the real pick up will happen. get user intervention with 1 button, to know they are there, and start the call build the way you want it.
     
  18. DjBac

    Joined:
    May 20, 2009
    Messages:
    137
    Likes Received:
    0
    That's what I thought!!

    So I am thinking of playing a short announcement twice or three times to inform him/her to push #1 and the the time condition!!

    Thanx!
     
  19. DjBac

    Joined:
    May 20, 2009
    Messages:
    137
    Likes Received:
    0
    EDIT: Sorry ignore this post!!
     

Share This Page