I want to add more parameter in sendsms HTTP URL only for create kannel-access.log and kannel.log.
example
http://<IP>:port/cgi-bin/sendsms?to=1234567890&from=Test&user=foo&password=bar&text=Test+msg
¶m1=value1¶m2=value2¶m3=value3
Here param1, param2 and param3 are extra http parameters and i wnat to add in logging as well.
example of kannel-access.log :
2012-12-12 14:08:01 Sent SMS [SMSC:SMSC1]
[SVC:SMSC1] [ACT:] [BINF:] [FID:1812121214063308550]
[META:] [from:ABC] [to:1234567890] [flags:-1:0:-1:-1:7]
[msg:107:Test+sms] [udh:0:]
[param1=param1][param2=param2][param3=param3]
Please help me to make changes in sendms command and logging.
You can use binfo or/and account parameters, its values will be logged in your access-log and then you can do whatever you want with that log file.
From kannel's user guide:
account:
Optional. Account name or number to carry forward for billing purposes. This field is logged as ACT in the log file so it allows you to do some accounting on it if your front end uses the same username for all services but wants to distinguish them in the log. In the case of a HTTP SMSC type the account name is prepended with the service-name (username) and a colon (:) and forwarded to the next instance of Kannel. This allows hierarchical accounting.
binfo:
Optional. Billing identifier/information proxy field used to pass arbitrary billing transaction IDs or information to the specific SMSC modules. For EMI2 this is encapsulated into the XSer 0c field, for SMPP this is encapsulated into the service_type of the submit_sm PDU.
Related
I am trying to implement a search functionality using webhook. I want to save user utterance in a parameter in case user query does not match any intent on start page.
Is there any way to save user utterances in parameter so that it can be used by webhook . Currently no match intent is invoked correctly but utterance does not go to webhook.
You should be able to extract the original user query and pass it as a parameter to your CX agents using webhook.
To do so, you should enable the “Use Webhook” option on the specific route where you want the user query to be extracted. When that route is triggered, you should be able to extract the original user query in your Webhook Request’s query union field. Here are the four possible Webhook Request fields where you can extract the relevant data based on the input type that the user provided:
“text” field - if natural language text was provided as input.
“transcript” field - if natural language speech audio was provided as input.
“trigger_event” field - if an event was provided as input.
“trigger_intent” field - if an intent was provided as input.
The user query that you extracted can then be passed as a parameter to your CX agent by adding it to your WebhookResponse body inside either of the following field:
WebhookResponse.page_info.form_info.parameter_info[]
WebhookResponse.session_info.parameters
Here’s an example webhook response containing a session parameter:
jsonResponse = {
"session_info":
{
"parameters":
{
"parameter_name": "parameter value"
}
}
};
What you can do:
Create an intent (e.g. 'NoMatchUtterance')
Fully label any training frases (this could just be some random phrases) for this intent with the parameter-id no-match-utterance (or something else) of type #sys.any. This will make sure that any reply is caught.
Create a route with this intent, below routes that match any other, preset intents. In the fulfillment of this route, you can now use $session.params.no-match-utterance.
An example from my projects:
This is the Scenario:
In the same Azure tenant, I used one account (user_1_address) to send emails to the other account (user_2_address) using outlook (o365).
I sent 3 emails, one where user_2_address is BCCed, one CCed, and one when it's the TO recipient.
I'm using Microsoft graph API to get a list of emails received by user_2_address in a specific time range, using this query:
https://graph.microsoft.com/v1.0/users/{<user_2_id>}/messages?$filter=
receivedDateTime ge <some date> and receivedDateTime lt <some other date>
and isDraft eq false
and sender/emailAddress/address ne '<user_2_address>'
I'm getting all the three emails user_2_address had received from user_1_address. But in the email user_2 was BCCed the bccRecipients list is empty, when it should contain user_2_address :(
I have seen this question about sending an email from Gmail and BCC an outlook user:
Microsoft graph API: empty BCC field
In that case, also the bccRecipients list was empty, but it was resolved by saying the BCC is removed when sending the emails from an external source (Gmail in that case). When for me it's not an external source - both users are using outlook in the same tenant.
So my questions are:
Is it the desired behaviour, or is it a bug?
Now, let's say I'm using the query above where I get all emails where the sender is not the user_2_address and it's not a draft. Can I assume that every email I get where user_2_address is not in the ccRecipients and toRecipients lists - that email was BCCed to user_2_address?
Thanks!
The bcc field in a Message is an envelope (P1) recipient only so you should always expect that it will be blank (no matter the context inside a tenant really make no difference). Like the other post referenced if it wasn't blank it would break the RFC and the purpose of a BCC, the only exception is the sent item (which is just a copy of the sent message)
No there are many scenarios that would break that particular logic eg forwarded email is one the comes to mind. You could certainly refine you result set that way, one thing you might want to examine is the X-MS-Exchange-Organization-Recipient-P2-Type: mail header that should get set in your internal to internal scenario (you need to look at the PidTagTransportMessageHeaders extended property to see it)
I'm trying to send an email to multiple people(multiple to addresses) and have them all listed in the email clients like a regular email. When I set the header_to field on all recipients to email1#foo.com, email2#foo.com I end up with emails that have a to header set to "First Name" <email1#foo.com, email2#foo.com> which is incorrect.
This shows up as a single person with multiple email addresses in most clients and the header is wrong.
Why is the sparkpost transmission api messing with the header_to field? It's docs say that it uses this in place of generating a To header for you.
After going through every page of docs I could find to try and figure out how sparkpost's backend works I've found that you must omit the Name field on all recipients.
https://developers.sparkpost.com/api/recipient-lists/#header-recipient-object
On slack - I can tag a user directly from my both with the following text syntax :
hello Francois <#francois>
I would like to do the same with a group (unfortunately my app only know the group name not the group ID). Is there a syntax to do so - the following syntax does not work :
hello group <#group>
It depends what you mean by "group".
Private channels are called groups by the Slack API (e.g.
groups.list)
Users can be assigned to functional groups called usergroups
internally by the Slack api (paid Slack only, e.g.
usergroups.list)
For 1) #mention will not work. Instead you can send a <!channel> into the private channel for the same effect.
For 2) the syntax is <!subteam^ID|handle>
See an excerpt of the documentation on how use them:
For paid account there is an additional command for User Groups that
follows the format . (subteam is literal text. ID
and handle are replaced with the details of the group.) These indicate
a User Group message, and should cause a notification to be displayed
by the client. User Group IDs can be determined from the
usergroups.list API endpoint. For example, if you have a User Group
named happy-peeps with ID of S012345, then you would use the command
to mention that user group in a
message.
If you only have the usergroup name and need the ID you can use usergroups.list to get the corresponding ID.
Is there a way (and does it make sense even) to have dynamical values for my request parameters (in my case POST application/x-www-form-urlencoded that has two parameters username and password) which can be altered based on some function or a returned value from the server from a previous request?
The motivation being that i have a register-new-user request which i run from time to time off apiary.io and unless i manually change the example value for the username i get a "use already exists" response instead of 201 i want (since this request was already run with the username in the example).
What i'd like to have instead is a value in the API documentation that will change on each execution of the API call (either using some random number there, or to be able to have it take a value returned from a previous request).
Is there anything you can suggest to solve my "user already exists" response for register-new-user API call?
Here is my current API documentation (the relevant part):
## Registration [/users.json]
The `/users.json` resource handles registration of new user
### Register a New Patient [POST]
Register a new patient action sends email and password and registers
the new user in case it doesn't already exist
+ Request (application/x-www-form-urlencoded)
+ Attributes (Test User)
+ Body
user[email]=username#example.com&user[password]=123456
+ Response 201 (application/json)
{
"id":500
}
# Data Structures
## Test User (object)
+ "user[email]" (string): "username#example.com" - user email
+ "user[password]" (string): "123456" - user password
Thanks in advance
You can partially simulate this in the Apiary mock server by passing a header in your call, for example:
Prefer: status=200
See https://help.apiary.io/tools/mock-server/#multiple-responses
In general the mock server is not yet flexible and programmable enough to fully do what you describe, for example conditionals, dynamic variables or random responses.
We are working on enhancing this. If you'd like you may comment here on your requirements:
https://github.com/apiaryio/api-blueprint/issues/58
Feel free to also ping us in Apiary (in-app chat) or on support#apiary.io.
Thanks