Unable to transfer call using AT Command
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Thread: Unable to transfer call using AT Command

  1. #1
    Join Date
    Oct 2012
    Posts
    3

    Unable to transfer call using AT Command

    I have created a console application that connects to my modem using AT Commands. I am able to dial a number and it works fine.

    I want to transfer a call to a different number, and I am unable to achieve this. The modem first dials the number 5052, drops the line and then dials 5056. I am using the hook-flash option that is used to transfer the call but it is not working, instead it is dropping and initiating a new call.


    Code:
    SerialPort port = new SerialPort("COM3", 115200);
    port.Open();
    port.ReadTimeout = 5000;
    port.NewLine = "\r";
    port.WriteLine("ATZ"); // reset the modem
    port.ReadTo("OK\r\n"); // wait for "OK" from modem
    
    port.WriteLine("ATDTW5052@"); // dial number with dialtone
    port.WriteLine("ATDT!5056"); // dial number with dialtone
    
    string response = port.ReadTo("\r").Trim(); // read until first newline
    Console.WriteLine(response);
    //port.Close();

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,018

    Re: Unable to transfer call using AT Command

    Does your modem support these "ATDTW" and "ATDT!" commands?
    Did you try to send them using HyperTerm?
    Victor Nijegorodov

  3. #3
    Join Date
    Oct 2012
    Posts
    3

    Re: Unable to transfer call using AT Command

    I have tried ATDTW and it works. The transfer using flash hook doesn't seem to work.

    Since ATDTW is working, can i assume that my modem support ATDT! as well?

    Is there a way to find out AT commands that are compatible?

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,018

    Re: Unable to transfer call using AT Command

    Quote Originally Posted by fawadhq View Post
    Is there a way to find out AT commands that are compatible?
    Yes, you just have to read the documentation of your modem.
    Victor Nijegorodov

  5. #5
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,018

    Re: Unable to transfer call using AT Command

    Quote Originally Posted by fawadhq View Post
    I have tried ATDTW and it works. The transfer using flash hook doesn't seem to work.
    Did you try ATD! instead?
    Victor Nijegorodov

  6. #6
    Join Date
    Oct 2012
    Posts
    3

    Re: Unable to transfer call using AT Command

    Yes even tried ATD! and it didn't work.
    It drops the first call and then dials the second number.
    Where as what i want is to transfer the call.

  7. #7
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,632

    Re: Unable to transfer call using AT Command

    As far as I understand it that's how it should work. ATDT! cause the modem to go on-hook a short period. See http://michaelgellis.tripod.com/modem.html
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    http://www.codeguru.com/forum/announ...nouncementid=6
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here
    http://www.codeguru.com/forum/misc.php?do=bbcode

    Get your free MS compiler here
    http://www.microsoft.com/visualstudio/eng/downloads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center