How to get information of callee when the call is forwarded - freeswitch

I have come to a question when dealing with call forwarding:
A and B are using Mobile Phones with PSTN.
C is another Phone Number but connected with FreeSWTICH Instance which pickups any calls C receives.
A calls B, B forwards to C, then FreeSWITCH routes A to an extension, in this extension, I would like to extract the Information of B, like its phone number, etc.
I have checked the variables in the channel, but it doesn't contain information of B.
Can any one help? Thanks.
BTW, one related topic:
http://lists.freeswitch.org/pipermail/freeswitch-users/2013-May/096044.html

It looks like the only relevant info you would get is B's phone number, if by any chance it is passed as the caller ID number to the FreeSWITCH server that C is attached to, but it that case you would lose A's phone number.
What you can try here is to check the SIP INVITE FreeSWITCH receives. In the CLI, try (SIP profile can be named to something different than external, but I'm assuming you configured your SIP provider to be attached to the external profile):
sofia profile external siptrace on
If B automatically forwards the call to C, you might get a SIP Diversion header that contains relevant information if C's carrier provides it.
Hope this helps!

Related

JPOS: Using pure java code vs Q2 to simulate acquirer and issuer?

currently I'm using jPOS to connect to our switch (payment gateway?), simulating both the acquirer and issuer. In other words, jPOS (client) will connect to the acq port on the switch (server), pack and send the iso message, switch routes it to the issuer port, which jPOS is also connected as a client, receives the request, packs and sends a response back to the switch.
I hope the above makes sense. I do have java code in place, but as it gets more complicated I've been considering using Q2 instead, but after reading through all of the Q2 documentation, I'm still unsure on a few things.
Firstly, my program will receive an HTTP POST request with all of the PORT, IP, and Transaction details. It won't know what the port is until it receives that data, so how can I create Q2 Channel-adapters, qservers, etc dynamically? Don't those files need to be predefined in the deploy folder? There will also be N number of these connections.
I would like to be able to have the issuer side open and waiting to respond automatically for any transaction, but also have the ability to modify the response for specific txns. Can that be achieved?
Thanks for any advice.
In a comment, I suggested breaking this question in 2, but meanwhile I'll answer the easy one (the number 2).
For this, you can use the ServerSimulator jPOS-EE module (see section 10.2 of jPOS-EE manual).
You can see an example configuration at https://github.com/jpos/jPOS-EE/tree/master/modules/server-simulator/src/main/resources/META-INF/q2/installs.

is there any way to find queue manger name from just Channel name?

I know if you have the Queue manager name, you can use it to display channels defined for it. but can you do the other way around and find out what Queue manager a channel belongs to?
Multiple queue managers can have the same channel name, for example the sample SYSTEM.DEF.SVRCONN.
So from this you cannot tell the name of your queue manager.
You could have MYCHANNEL_QMA, and know from your naming conventions that this is for QMA, but this could also exist on queue manager QMB.
Using platform commands, you may be able to get the IP address of the remote end, and so find the machine it is running on. From IP address and port, you may be able to pin it down, but there is a good chance you cannot get this information as you may not have access to the information on the box.
It might be easier for your application to use MQINQ on the connection and display this.
Colin

Twilio SMS message Not Delivered with unknown error

We're having this weird problem with Twilio SMS messages hanging with status.
We have tried sending from different Twilio phone numbers to make sure it isn't a problem with that particular number being blocked and none of them go through.
Our system uses SMS messages in the standard form of two-step authentication with a code and a short message to the user inside the SMS body.
The carrier that the message sent is failing is Tune Talk (A Malaysian one).
The error in the Twilio Logs/Console I see is:
Status: Undelivered
Error: (Error: 30008) Unknown error. None
Message SID if it's in any way useful is: SM1024a2d519cf4f6bbfcbc838587cb2af
Any insight on why this is happening would be greatly welcomed.
We had also the same issue with phones that used to receive messages.
The problem is carrier blocking/filtering.
Every carrier uses different filters.
Some carriers block messages with 90% the same content, others use rate filtering (1 message per second or more) others use a combination. The blocking is not forever thought.
Twilio gives the following possible solutions:
Check that the phone you were sending to is turned on and can receive SMS
Ensure that the phone is not roaming off network. We cannot
guarantee message delivery on roaming phones.
Try sending to other phones who have the same mobile carrier.
If messages to other phones go through, the issue is likely device
related. Try rebooting the device or contact the mobile carrier for
help.
If you are sending SMS from an alphanumeric sender ID, see if using
a Twilio phone number works better. We’ve observed that certain
networks may block alpha sender IDs.
Try sending a shorter message to the phone, with simple content that
does not include any special characters. This would give our support
team an idea as to whether the failure is related to concatenation
or character encoding.
Twilio support can help investigate what went
wrong with our carriers. Please open a support request and include a
minimum of 3 or more message SIDs where a 30008 error was thrown.
Per our carriers' requirements, these SIDs can be no older than 48
hours at most.
Check -> Error 30008
Another solution is to use a 5digit code phone number.
Boris, error 30008 is certainly less descriptive than one would hope. In this case, it would be best to send that Message Sid along to support where we can dig a little deeper into the specifics.
Though it doesn't sound like it in this case, if there were a problem with your code, you could check out a production ready account verification tutorial here.
Came here because of exactly the same problem. I have someone who successfully received SMSes just 12 days ago, using the same Australian number, getting a 30008 for every attempt to send to them today. That's a really average-quality error message right there.
The user states that they ported the number from Telstra to Vodafone, but that was 3 months ago. I'm guessing that the forwarding is broken:
http://www.commsalliance.com.au/__data/assets/pdf_file/0013/2326/G565_2009.pdf
In particular:
1.4.4 Where internationally originated SMS is supported donor routing
must be supported wherever bilateral agreement exists for the
national leg, as international networks are not likely to access an
Australian mobile number portability database prior to routing the
message. However, certain limitations apply – see Appendix A.
Since Twilio aren't sending from an Australian number, they probably aren't looking through the number portability database. This would be my suspect cause for any failure to SMS route to a country with number portability.
I've had some of these errors when doing MMS's.
If I look at the detail in the Twilio console, there is additional detail and a secondary error message "12300 Invalid Content-Type. Attempt to retrieve MediaUrl returned an unsupported Content-Type."
I was putting images up on S3, but not setting the Content-Type of the image when I put it on S3.
In my case, the problem was that I was including a website URL in the message.
Once I removed it (replaced it with a simple name) it worked.
I'm not sure whether the issue was the URL itself (e.g. the network considers it spam) or the fact that it contained characters like /.

Exchange EWS MessageId -> Available in ActiveSync too?

Is there anyway to get the same "MessageId" you can get in Exchange EWS when using ActiveSync?
I thought this was an Exchange way to identify each message uniquely, but I can't seem to find a way to retrieve it using ActiveSync.
EDIT: I've got 2 applications, one that stores info using ActiveSync, and one that stores info using EWS, and I want them to be able to work separately on the same message.... To do this, I was hoping to use the EWS MessageId, which seems to be a GUID type identifier for each individual message. (Note: This doesn't appear to be the same Message-ID as is found in email headers).
Sadly, you're mostly out of luck.
ActiveSync is not an integration protocol, it's a mobile synchronization protocol designed for low-bandwidth communication devices like smart phones. A lot of capabilities in EWS will not exist in EAS.
Long-term message identification and correlation isn't as important for mobile devices. They simply get told what messages are in each folder, and allow the user to manipulate them. At any time the Exchange server may tell its EAS-connected clients to "re-sync" which causes them to forget the messages they have on the device and pull them cleanly from the server. That happens a lot with EAS, sometimes a couple of times an hour, depending on what is happening with that mailbox. For example, deleting a folder via Outlook causes a FolderSync to happen, and that forces connected devices to cleanly re-sync again.
Therefore EAS appears to have left behind the notion of GUIDs or other long term IDs for messages. Instead, the server will assign ephemeral IDs that are valid only until the next big resync is forced (which could happen at any time). You'll probably see Exchange give very simple IDs like 7:45 (which means message ID 45 within folder 7, IIRC). However after a resync that might have the number 7:32 (if the user deletes other messages in that folder) or something like 4:22 (if the message gets moved to another folder entirely).
Other EAS servers like Zimbra, Kerio or Notes Traveler might assign GUIDs, but from memory this is how Exchange behaves. Your only option might be to put a hidden correlation ID of your own into the body or subject of messages you're interested in. That will allow you to track the lifecycle of the items you're interested in, at the expense of some odd stuff being visible to users in their message contents.
#Brian is correct - There are no global unique identifiers for ActiveSync items that can be used to correlate with EWS (With some exceptions, for instance a meeting invite has a UID, as do Events which can be used with some hackery to retrieve an EWS ID for the related EWS calendar event) and there are no fields that aren't visible to the user that can be hijacked for adding your own data with which to correlate. This is most apparent in email, contacts, tasks, notes etc...
However if you are syncing both, it is possible to use the meta data in the objects to match. For instance, for contacts write a hashing algorithm that combines the data from the first name, last name, company name, etc... fields and produces a result. This can be run on the data from both sides and will have relatively little object collision for matching (and those that do collide will have exactly the same visible data to the user anyway so in most cases it won't matter that you didn't get an exact alignment)

Biztalk Send Port Group and Filtering

So the model I need for my solution is as follows:
I need to poll the database and based on a result, create a request to the database for more data, get the response and pass it to a group of ports, for which based on a promoted property, only one of the ports will act.
It looks like this:
However, if you assign "Temp Out" to a send port group, the message is sent to all the ports in the group, irregardless of the filters set on each port. From my understanding, this is expected behavior (read here).
So I explored other options such as using Content Based Routing (CBR sample) like in the SDK. You can view this here.
I tried this and completely removed the orchestration (its really not needed). However, there are major routing/subscription errors, and upon further research, it appears that you can't do this if you have solicit-response ports. Some articles on that here. I pretty much have the same issue this user does.
In the end it doesn't matter to me whether I use an orchestration or not. However, I need a solution in which I can pass the message to multiple send ports, and I can have only one actually use the message and send. This is needed so that I can edit and add ports easily without having to modify anything else or hard code decisions into the orchestration.
You can use Direct Binding on the orchestration's send port to inject the message back into the message box db. Using multiple port groups, each port group can then directly subscribe to the desired message type and filter on promoted properties.
I found that the CBR example model does indeed work. The problem with routing were the subscriptions. If I was to subscribe a send port to a solicit-response port, I had to set the BTS.SPName (Send Port Name) filter instead of the BTS.ReceivePort filter. By doing this, the message was correctly filter through. You're answer would have worked too, but it requires using an orchestration which I was trying to avoid.

Resources