Click here to Skip to main content
15,843,865 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I'm trying to make a call from code using asterisk, the number i want to call (522) rings but when I pickup the phone there is nothing, nothing happen even on 525, number that should be making the call

do i miss something?

help would be appreciated

Nibbio

this is the code:

VB
Dim myManagerConn As New ManagerConnection()
myManagerConn.Hostname = "192.168.0.149"
myManagerConn.Username = "username"
myManagerConn.Password = "password"
myManagerConn.Port = 5038
myManagerConn.Login()


Dim oc As New Asterisk.NET.Manager.Action.OriginateAction()
oc.Context = "default"
oc.Priority = 1
oc.Channel = "SIP/522"
oc.CallerId = "Asterisk.NET"
oc.Exten = "525"
oc.Timeout = 30000
oc.Async = True



Dim r As Asterisk.NET.Manager.Response.ManagerResponse
r = myManagerConn.SendAction(oc, oc.Timeout)


myManagerConn.Logoff()
Posted
Comments
javedlasi 28-Dec-18 12:21pm    
Dear did you find the solution? I also trying to make VoIP call using Asterisk but can't find any help anywhere. Can you help me please?

Ask your question here[^].

It's EXTREMELY unlikely anyone who has used this library is ever going to see your question here.

What you have questions about a specific library, it's best to ask the people who wrote it or find a forum dedicated to that library.
 
Share this answer
 
var originateAction = new OriginateAction();
var originateResponse = new ManagerResponse();
originateAction.Priority = 1;
originateAction.Channel = channelToUse;

originateAction.CallerId = "FCONUCDialler";

originateAction.Exten = outgoingNumber;
originateAction.Timeout = timeout; // timeout in ms
originateAction.Data = outgoingNumber;
// originateAction.Variable = "VAR1=ABC|VAR2=25"; // If you need to pass variables to the dialplan

originateAction.Account = "SIP/" + outgoingNumber;
// originateAction.Application = "Dial";

originateAction.Async = true;

originateResponse = ApplicationVariables.manager.SendAction(originateAction, timeout);
 
Share this answer
 
Comments
MikeGarcia 23-Mar-17 18:30pm    
Have you encountered any "Permission Denied" response while you're developing it? I keep on getting "Permission Denied" response everytime I call any action in SendAction command. Thanks.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900