简体   繁体   中英

Dial 10 digit mobile number from asterisk and C#

I have configured asterisk and using AsterNet to consume asterisk functionality. While I am trying to originate call to a local mobile number. Call first come to the extension number (2001) if I pick up only then call goes to mobile number. I have created channel from a usb dongle.

Please suggest where I need to make change so that call directly connect to the mobile number.

Code that I am using to originate call is

        OriginateAction oc = new OriginateAction();
        oc.Context = "from-internal";
        oc.Priority = 1;
        oc.Channel = "SIP/2001";
        oc.CallerId = "any id";
        oc.Exten = "9911XXXXXX";
        oc.Timeout = 15; 
        ManagerResponse originateResponse = manager.SendAction(oc, oc.Timeout);

You need ensure your exten is availible in from-internal context

You HAVE understand asterisk internals and dialplan to do such module, sorry.

Can recommend you ORelly's "Asterisk the Future of Telephony" book.

If you need other order of operations(first call, after that call ext), you have use Local channel for dialout FIRSt, after that your extension for dial second.

ps create your own dialling core without FULL understanding how switch work is REALY bad idea. You will have alot of issues.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM