Forwarding Twilio numbers - numbers

I am still new to Twilio, and I was wondering if anyone knows how I can forward my Twilio phone numbers so that I can receive the calls in my office phone number?

Jarod from Twilio. Essentially you'll just want to point your Twilio number's incoming Voice Calls URL to a new TwimlBin and inside that Twiml Bin you would then forward all calls by responding with the Dial verb, which just dials your office number.
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Dial>
+1-555-555-5813
</Dial>
</Response>
Hope that helps!

Related

Forward SMS from Twilio to Email using Zoho Deluge

As far as I know, you can't forward SMS messages to an email address with just a TwiML Bin. Therefore, I would like to forward Twilio SMS messages to my Zoho email address using Zoho Deluge (instead of the other alternatives I've seen: Google Apps Script or SendGrid).
I intend to use the free Zoho Deluge plan. I have never used Deluge before. This question is intended to help me discover whether Deluge can be a replacement for Google Apps Script for simple functionality like this where a form is not needed.
The basic way to send an email using Deluge is shown here.
I hope Deluge can do the same thing Google Apps Script can do.
Twilio developer evangelist here.
To forward an SMS that is sent to your Twilio number you need to be able to receive an incoming HTTP request.
Zoho Deluge appears to allow you to create functions that can be invoked. However, the methods by which you can invoke a Deluge function do not include via an incoming HTTP request.
I'm not familiar with Deluge, but after a bit of navigating around the documentation I don't believe you can set up a URL that will invoke a function, therefore you can't use Deluge to forward incoming SMS messages with Twilio. As Alan suggests in the comments, you could use Twilio Functions to achieve this without reaching out to another service.

Whats the best way to extend XMPP Presence stanza

We were using openfire 3.7.1 as our XMPP server, and we wanted to extend the Presence stanza to include some extra information like:
<presence from="you#MyServer.com">
<body>...</body>
<custom_element>
<custom_data/>
</custom_element>
</presence>
Could you please show me some pointers as what would be a better approach to do so? E.g., should I modify or extend some XMPP schema so that openfire will process the above presence packet as usual (currently if I send message like above, openfire seems not taking it as a Presence packet)? And should I create a plugin to intercept all packets so as to process our custom elements?
Thanks in Advance!
This is how it is normally done:
<presence from="you#MyServer.com">
<x xmlms="http://mycompany.com/mycustomnamespace1>
<custom_data/>
</x>
</presence>
Openfire will route such a packet without any problems.
You only need a server plugin when the server has to process any action on this custom elements. When the server should route the presence only to your contacts then nothing is required on the server.

Send string to XMPP MuC participants without using "Message" object

In my current project I want to communicate with people in a XMPP Multi User Chat. But also I need to send data to all participants in the conference, but this data should not be seen as a message.
Is it possible to send data (strings) to all participants in a MuC channel by not using a normal chat message?
I'm using Smack API, and I assume, that all participants use my program.
Thanks in advance!
The solution is to use a normal message (with type="groupchat"), but do not include a <body>.
I do not know how this is done in Smack, or if it is possible (I hope it is). An example message would be:
<message to="room#conference.server" type="groupchat">
<yourdata xmlns="your-xmlns">
<anything-you-want-here/>
</yourdata>
</message>
XMPP clients will ignore this message, as it has no <body> tag.

Problem creating a chat room with XMPP in an iOS app

I have an iphone app where I want to use chat rooms. I've installed an XMPP server (ejabberd) and downloaded the XMPP framework for iOS from google code (http://code.google.com/p/xmppframework/). The server and client work as expected, since I'm able to log in and send chat messages between two users.
However, when I try to create a chat room using the createOrJoinRoom method of the XMPPRoom class (in XEP-0045), I don't get any reply from the server and the chat room is not created.
I've debugged to see what kind of package is sent to the server and it looks like this:
<presence from="test2#beta.bogus.net/mynick" to="muumit15#conference.beta.bogus.net">
<x xmlns="http://jabber.org/protocol/muc"/>
</presence>
I get no error message back but the chat room (muumit15) is not created. At the same time I can use e.g. Adium client to create a chat room and it succeeds. The server has been configured so that every user has a right to create chat rooms.
Any ideas? I even tried sniffing the TCP/IP traffic sent by the Adium client but that was encrypted/compressed/binary so I couldn't see what kind of packages it is sending.
See section 7.2.2 of XEP-0045, particularly Example 18:
<presence
from='hag66#shakespeare.lit/pda'
to='coven#chat.shakespeare.lit/thirdwitch'>
<x xmlns='http://jabber.org/protocol/muc'/>
</presence>
Note that the to address MUST contain a resource, and yours doesn't. The resource is the string after the /, which is used as your nickname in the room. For more information on the XMPP address format, see RFC 6122.

user profile from XMPP iPhone

I am using XMPP for chatting in my iPhone application, I need to retrieve the profile of every user in buddy list, like phone number, street address etc.
How can I get started?
While XEP-54 can be used for this purpose, PLEASE do not spam the network by making vcard-temp requests for everyone on your roster every time your client logs in. Since you haven't told us what client library you're using, all we can do is provide you with the protocol you need to send:
<iq id='v1'
type='get'>
<vCard xmlns='vcard-temp'/>
</iq>
Note that XEP-54 is about to be obsoleted by XEP-292, but it will take several years for that transition to take place.