cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2015
Views
30
Helpful
12
Replies

CCX with SMS Gateway

Flo.Matalis
Level 1
Level 1

Hi Experts,

 

Just want to ask for any ad vises.  I'm trying to build a script wherein the Caller will choose Option 4 (for example), then it will send the Caller ID via XML / HTTP to the SMS gateway server. Can you please tell me how to achieve this or what function can I use? Any help will be appreciated. Thank you.

 

Regards,

Flo

12 Replies 12

Konstantin Vaksin
Cisco Employee
Cisco Employee

I think this is a question to feature set of SMS Gateway

As @Konstantin Vaksin has already mentioned this is the matter of the SMS gateway that you will use. Before you make any scripting, you will need to do some discovery how you SMS gateway can be controlled. Some of the SMS Gateways are using SMPP protocol (https://smpp.org/), some have a custom protocol (ex. Twilio, Telnyx) – but you can find good documents on the net to see the description of the protocol (sometimes even SDK).

Based on the options I think that you will have at least 2 options:

  • If the interface is simple and its REST based – there is a big chance that you can use standard script elements/blocks to build the integration.
  • If the interface is complex, then you will probably need to upload custom jar libraries and do some Java coding in the script content.

Which method will be good for you, that depends on the SMS gateway type.

Marek
Web: https://gaman-gt.com

Just to add… 3 rd option. Instead of pushing jar libraries to the UCCX, you might want to create Web application on one of your WebServers, that will be able to generate specific request to SMS Gateway after http push.

Kostia

nanosynth
Level 1
Level 1

You may not be interested but maybe others might? I have done this very easily but I already had my CentOS7 Linux box with PHP built for all my regular IVR query's. First, I bought a phone number from "Twilio", its super cheap. Then I downloaded the "twilio-php-master" zip file from GitHub. Then I just uncompressed it in my www folder on my Linux box where all my PHP scripts sit. Then I built a PHP script that is exactly this below and I have that in the same www folder that the twilio files and my other PHP scripts are on my Linux box. Then in my UCCX script when I want it to like take someones keyed in cellphone number and text them, I accept their inputted number and hold it in variable 'number1'. I have in the UCCX script already made messages in other variables, like variable "message1". So in UCCX I then build a webcall to call to my PHP Linux box with those 2 variables in it and the complete webcall looks like http://10.10.100.5/uccxSMSout.php?&NumberOut=number1&TextOut=message1 The webcall in UCCX is executed by the Create URL Document followed by the Cache Document step (thanks to Anthony Holloway on here). So that will get everything over to my PHP Linux box and PHP and Apache on there will intertwine with the Twilio library on there and send it all to Twilio and Twilio will extract the phone number and message and send the text. One thing I had to overcome (and the UCCX would error out on the Cache Document step) is that PHP doesn't like the spaces in the actual text messages you would have previously typed into variables into UCCX, so I had to use the UCCX string find and replace, to find spaces and replace them with "%20" for each space between words in your previously typed outbound text messages or, if you were to concatenate words for an outbound text message on the fly you still need the %20 in there between the words, like "I want to get out of here", so the UCCX SET command would make that "I%20want%20to%20get%20out%20of%20here" Believe me, it comes out correct on the persons cell phone screen. 

 

<?php

require __DIR__ . '/twilio-php-master/src/Twilio/autoload.php';
use Twilio\Rest\Client;

// Your Account SID and Auth Token from twilio.com/console

$nbr = $_REQUEST['NumberOut']; $txt1 = $_REQUEST['TextOut'];


$account_sid = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
$auth_token = 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy';

// A Twilio number you own with SMS capabilities

$twilio_number = "+18082223333";

$client = new Client($account_sid, $auth_token);
$client->messages->create(

$nbr,
array(
'from' => $twilio_number,
'body' => $txt1
)
);

@nanosynth thanks for sharing :) +5

*** Please rate helpful post. Please mark as answer if it solves your problem/query.
regards, Ritesh Desai

Thanks all for your advises. Really appreciated.

 

I am using "Make REST Call" and everything is good if I will just put a static number (MobileNo) however I am having issue adding the MobileNo variable to the string variable. Is there a way to call the MobileNo variable inside a string? I would like to add it below, for example:

"<SMS><Mobile>MobileNo</Mobile><Message>Test Message</Message></SMS>"

 

Or is there a way to convert a Document File as a String? Thanks in advance.

I have never used the REST call step, but Im interested. Anyway can you can share your code on how you used it? Who are you using to actually send the text to the phone number you provide and the text message? I'm not quite sure what your asking but if you want to do 'concatenation' of a standard string variable, then you have to use the SET step. SET the main variable that will hold all the concatenation to something like this, PhoneNumberEntered + TextOut + TextMsgOut  Those 3 things are all preset variables. I actually did this SET step with the main variable being a DOC variable, so the DOC will then contain all the things you want to stuff into it.

Forgot to tell you, then in the SET step right after that, I then SET a main real variable (not a DOC variable) to be = to   "" + SMSurl + smsItemsDOC  which then takes what I just put in the DOC from the above SET STEP and concatenates it with my web URL variable, then puts all that into a regular string variable for the CREATE URL document to process (or whatever you want).

Thanks for all your replies. Was able to achieve it by concatenating the string values. Stay safe!

Any chance you can actually share what you did with the REST step and SMS? I have never used the REST step and always wondered what I can use it for.

Here is my SMS script.

Andreas Stuber
Level 4
Level 4

Flo,

 

What you describe sounds similar to a Visual IVR. We provide a Chat solution that allows you to send messages over any chat platform (amongst which SMS and Whatsapp), either from an IVR or as part of an agent chat solution. Customer Data such as the Caller ID is stored in Customer Interaction Manager that is part of the solution.

This is maybe a bit more than what you're searching for, but might be helpful if you plan to extend the solution.

Regards,

Andreas

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: