sunlabs.brazil.asterisk

Class AsteriskHandler.AmiStringMap

public static class AsteriskHandler.AmiStringMap extends StringMap

This class is built on top of the StringMap class and adds methods for reading Asterisk ManagerInterface replies.

AMI responses are either:

  • Constructor Summary
    AmiStringMap()
    AmiStringMap(StringMap map)
    Method Summary
    Stringcommandify(String id)
    Turn an AmiMap into an asterisk command.
    static Stringcommandify(StringMap map, String id)
    voidread(HttpInputStream in)

    Constructor Detail

    AmiStringMap

    public AmiStringMap()

    AmiStringMap

    public AmiStringMap(StringMap map)

    Method Detail

    commandify

    public String commandify(String id)
    Turn an AmiMap into an asterisk command. Make sure the "Action" keyword exists and is first.

    Returns: null if there wasn't a valid command

    UNKNOWN: id add the "id" at the end of the actionid

    commandify

    public static String commandify(StringMap map, String id)

    read

    public void read(HttpInputStream in)