Asterisk: callerid is shown as anonymous - asterisk

I'm trying to use asterisk to dial auto calls, but the problem is that the callerid is shown anonymous in the client device.
so how can I set the callerid to be shown correctly in the client device?

You're probably originating that call. Two methods are responsible for that:
ast_pbx_outgoing_app
ast_pbx_outgoing_exten
Based on how the origination is done, you may need to slightly modify apps/app_originate.c or res/res_clioriginate.c.
If you're using AMI (The Asterisk Manager Interface) to originate the call, you can just simply "Set" the variable CALLERID(all) to whatever you want to use.
The anonymous is the default value when NULL callerid is passed to one of the functions.

Related

Direct dialling from Callback option to be disabled

I am facing 1 issue with my asterisk, When agents make calls directly from there "Callback list" that calls are not recorded. To make call recorded they need to copy number from callback list and dial it manually. Is there any way i can record calls dialed directly from callback list or any way to disable direct dialing from callback list?
Yes, you have rewrite your callback application to use recording dialplan or call back via
Local/number#from-internal/n
Recording of call is not property of call, it have be enabled by dialplan function MixMonitor.
So most likly your callback app just not designed for your pbx or created by stranger in asterisk field.

Implement Call queues in adhearsion

I need to implement the below use-case in asterisk + adhearsion and not sure on how to do that
When a customer call comes. I check list of available agents if the agents are busy i need to put the call in a queue with a timeout. If the agents don't become free within the given timeout the call hangs-up otherwise call gets routed to the agent.
Any idea on how to implement this flow?
There are a few ways to implement this, your approach very much depends on how will you know if an agent is available? What I would recommend is:
Call comes in
Adhearsion router, routes the call to the inbound call controller
This in bound controller checks your list of agents
If the agent is available and not on a call you can use the "dial" command to call the agent and automatically join the two calls.
If the agent is available and has an active call you can use "join"
If there are no agents available then use the "play" command to play some hold music asynchronously, while you keep checking if an agent becomes available.
When you detect an agent is available you can then "stop" the hold music and dial the call to the agent.
In order to determine which agents are available you will need some sort of agent list and their associated status which you update as they take calls. Alternatively you can try pull some of this information directly from the asterisk extensions.conf file, or the DB if you are using PIAF.
Most of the code examples you need to write something like this are given on the Adhearsion website. http://www.adhearsion.com/docs
Edit:
The better way of approaching this now will be to use the ElectricSlide call queue module. There has been a lot of work done on it recently and it is now a pretty solid call queue.
https://github.com/adhearsion/electric_slide/

Why would originate call fail when using the Asterisk API with the Context set to "default"?

When I originate a call to an outside line, setting the context to "default" causes a voice to say "good bye" and then the call is immediately terminated.
If I call an extension, it works perfectly with or without the context property.
If I remove the context property entirely, then I can call both inside and outside lines.
So what's going on?
You need setup context default corectly.
Or use other context to do dialplan.
see this links
extensions.conf
dialout

Accessing workflowArguments in a hosted workflow

We are mixing workflows, a workflow using receive activity's more at the end. But at the start we want to pass in some arguments (not using a receive activity!)
Our workflows are already being created and resumed using a dynamic endpoint with IWorkflowCreation and a class derived from WorkflowHostingEndpoint. In the OnGetCreationContext the creationgContext is filled with WorkflowArguments and the workflow runs. At a later part the receive activity's are creating a bookmark which can be resumed with a message. All seems nice.
But in a xamlx there are no WorkflowArguments, i understand why, except that i want them anyway. I though about an activity in which i can write some code to get the Arguments myself, but i do need some help here.
Or is there another way to pass along the WorkflowArguments into a xamls without using Messaging?
You can't pass arguments into a starting workflow service except through the SOAP message that starts it. But there is nothing preventing you from reading any properties in your workflow service. So it is perfectly fine to do read settings or something similar instead of passing them in at startup.
We have solved this exact situation by creating another WCF service which sits alongside our xamlx service on a slightly different url (e.g. /WorkflowMetadata) and this is where we implement a service method that returns a dictionary of string, type.
In the implementation of this service we simply read the xamlx and determine the arguments.
This is what we use to interrogate a target workflow in an activity designer when creating something like a launch-workflow activity.
Creating an activity will not work as that activity will need an instance in order to run. All you want is some metadata about the xamlx service. And if you are using a WorkflowCreationEndpoint to construct a creation context then you are probably only allowing a dictionary of string, object as the start parameters. Therefore standard metadata will not work. This left us with the only option being to provide another service beside the workflow which serves metadata.
Background here: http://blog.petegoo.com/index.php/2011/09/02/building-an-enterprise-workflow-system-with-wf4/

How to Call BizTalk Orchestration Dynamically

How can I call a BizTalk Orchestration dynamically knowing the Orchestration name?
The call Orchestration shapes need to know the name and parameters of Orchestrations at design time. I've tried using 'call' XLang keyword but it also required Orchestration name as Design Time like in expression shape, we can write as
call BizTalkApplication1.Orchestration1(param1,param2);
I'm looking for some way to specify calling orchestration name, coming from the incoming message or from SSO config store.
EDIT: I'musing BizTalk 2006 R1 (ESB Guidance is for R2 and I didn't get how it could solve my problem)
The way I've accomplished something similar in the past is by using direct binding ports in the orchestrations and letting the MsgBox do the dirty work for me. Basically, it goes something like this:
Make the callable orchestrations use a direct-bound port attached to your activating receive shape.
Set up a filter expression on your activating receive shape with a custom context-based property and set it equal to a value that uniquely identifies the orchestration (such as the orchestration name or whatever)
In the calling orchestration, create the message you'll want to use to fire the new orchestration. In that message, set your custom context property to the value that matches the filter used in the specific orchestration you want to fire.
Send the message through a direct-bound send port so that it gets sent to the MsgBox directly and the Pub/Sub mechanisms in BizTalk will take care of the rest.
One thing to watch out in step 4: To have this work correctly, you will need to create a new Correlation Set type that includes your custom context property, and then make sure that the direct-bound send port "follows" the correlation set on the send. Otherwise, the custom property will only be written (and not promoted) to the msg context and the routing will fail.
Hope this helps!
Look at ESB Guidance (www.codeplex.com/esb) This package provides the functionality you are looking for

Resources