*** main/devicestate.c.org 2018-05-03 02:12:43.507582798 +0900 --- main/devicestate.c 2018-05-06 03:45:59.437734044 +0900 *************** *** 168,173 **** --- 168,174 ---- { /* 6 AST_DEVICE_RINGING */ "Ringing", "RINGING" }, /*!< Ring, ring, ring */ { /* 7 AST_DEVICE_RINGINUSE */ "Ring+Inuse", "RINGINUSE" }, /*!< Ring and in use */ { /* 8 AST_DEVICE_ONHOLD */ "On Hold", "ONHOLD" }, /*!< On Hold */ + { /* 9 AST_DEVICE_IUSE */ "I-use", "IUSE" }, /*!< I-use */ }; /*!\brief Mapping for channel states to device states */ *************** *** 281,286 **** --- 282,289 ---- return AST_DEVICE_RINGINUSE; else if (!strcasecmp(val, "ONHOLD")) return AST_DEVICE_ONHOLD; + else if (!strcasecmp(val, "IUSE")) + return AST_DEVICE_IUSE; return AST_DEVICE_UNKNOWN; } *** main/pbx.c.org 2018-05-04 03:30:51.362615974 +0900 --- main/pbx.c 2018-05-02 17:52:54.314382832 +0900 *************** *** 613,619 **** { AST_EXTENSION_RINGING, "Ringing" }, { AST_EXTENSION_INUSE | AST_EXTENSION_RINGING, "InUse&Ringing" }, { AST_EXTENSION_ONHOLD, "Hold" }, ! { AST_EXTENSION_INUSE | AST_EXTENSION_ONHOLD, "InUse&Hold" } }; struct pbx_exception { --- 613,620 ---- { AST_EXTENSION_RINGING, "Ringing" }, { AST_EXTENSION_INUSE | AST_EXTENSION_RINGING, "InUse&Ringing" }, { AST_EXTENSION_ONHOLD, "Hold" }, ! { AST_EXTENSION_INUSE | AST_EXTENSION_ONHOLD, "InUse&Hold" }, ! { AST_EXTENSION_IUSE, "I-use" } }; struct pbx_exception { *************** *** 3000,3005 **** --- 3001,3008 ---- return AST_EXTENSION_INUSE; case AST_DEVICE_NOT_INUSE: return AST_EXTENSION_NOT_INUSE; + case AST_DEVICE_IUSE: + return AST_EXTENSION_IUSE; case AST_DEVICE_TOTAL: /* not a device state, included for completeness */ break; } *************** *** 3291,3296 **** --- 3294,3300 ---- break; case AST_DEVICE_ONHOLD: case AST_DEVICE_INUSE: + case AST_DEVICE_IUSE: /* find up channel */ search_state = AST_STATE_UP; break; *** funcs/func_extstate.c.org 2018-05-03 02:14:00.737726110 +0900 --- funcs/func_extstate.c 2018-05-03 02:20:04.158404643 +0900 *************** *** 56,62 **** NoOp(4567@home has state ${EXTENSION_STATE(4567@home)}) The possible values returned by this function are: UNKNOWN | NOT_INUSE | INUSE | BUSY | INVALID | UNAVAILABLE | RINGING | ! RINGINUSE | HOLDINUSE | ONHOLD ***/ --- 56,62 ---- NoOp(4567@home has state ${EXTENSION_STATE(4567@home)}) The possible values returned by this function are: UNKNOWN | NOT_INUSE | INUSE | BUSY | INVALID | UNAVAILABLE | RINGING | ! RINGINUSE | HOLDINUSE | ONHOLD | IUSE ***/ *************** *** 90,95 **** --- 90,98 ---- case AST_EXTENSION_ONHOLD: res = "ONHOLD"; break; + case AST_EXTENSION_IUSE: + res = "IUSE"; + break; } return res; *** funcs/func_devstate.c.org 2018-05-04 02:34:34.306185625 +0900 --- funcs/func_devstate.c 2018-05-03 02:20:09.278414250 +0900 *************** *** 68,74 **** exten => 1234,hint,Custom:lamp1 The possible values for both uses of this function are: UNKNOWN | NOT_INUSE | INUSE | BUSY | INVALID | UNAVAILABLE | RINGING | ! RINGINUSE | ONHOLD --- 68,74 ---- exten => 1234,hint,Custom:lamp1 The possible values for both uses of this function are: UNKNOWN | NOT_INUSE | INUSE | BUSY | INVALID | UNAVAILABLE | RINGING | ! RINGINUSE | ONHOLD | IUSE *************** *** 249,255 **** " Change a custom device to a new state.\n" " The possible values for the state are:\n" "UNKNOWN | NOT_INUSE | INUSE | BUSY | INVALID | UNAVAILABLE | RINGING\n" ! "RINGINUSE | ONHOLD\n" "\n" "Examples:\n" " devstate change Custom:mystate1 INUSE\n" --- 249,255 ---- " Change a custom device to a new state.\n" " The possible values for the state are:\n" "UNKNOWN | NOT_INUSE | INUSE | BUSY | INVALID | UNAVAILABLE | RINGING\n" ! "RINGINUSE | ONHOLD | IUSE\n" "\n" "Examples:\n" " devstate change Custom:mystate1 INUSE\n" *************** *** 259,265 **** case CLI_GENERATE: { static const char * const cmds[] = { "UNKNOWN", "NOT_INUSE", "INUSE", "BUSY", ! "UNAVAILABLE", "RINGING", "RINGINUSE", "ONHOLD", NULL }; if (a->pos == e->args + 1) return ast_cli_complete(a->word, cmds, a->n); --- 259,265 ---- case CLI_GENERATE: { static const char * const cmds[] = { "UNKNOWN", "NOT_INUSE", "INUSE", "BUSY", ! "UNAVAILABLE", "RINGING", "RINGINUSE", "ONHOLD", "IUSE", NULL }; if (a->pos == e->args + 1) return ast_cli_complete(a->word, cmds, a->n); *** include/asterisk/pbx.h.org 2018-05-03 02:14:53.787824736 +0900 --- include/asterisk/pbx.h 2018-05-03 02:20:20.438435194 +0900 *************** *** 67,72 **** --- 67,73 ---- AST_EXTENSION_UNAVAILABLE = 1 << 2, /*!< All devices UNAVAILABLE/UNREGISTERED */ AST_EXTENSION_RINGING = 1 << 3, /*!< All devices RINGING */ AST_EXTENSION_ONHOLD = 1 << 4, /*!< All devices ONHOLD */ + AST_EXTENSION_IUSE = 1 << 5, /*!< All devices IUSE */ }; /*! *** include/asterisk/devicestate.h.org 2018-05-03 02:15:25.167883144 +0900 --- include/asterisk/devicestate.h 2018-05-03 02:20:28.288449929 +0900 *************** *** 59,64 **** --- 59,65 ---- AST_DEVICE_RINGING, /*!< Device is ringing */ AST_DEVICE_RINGINUSE, /*!< Device is ringing *and* in use */ AST_DEVICE_ONHOLD, /*!< Device is on hold */ + AST_DEVICE_IUSE, /*!< Device is i-use (panasonic) */ AST_DEVICE_TOTAL, /*!< Total num of device states, used for testing */ }; *** channels/chan_sip.c.org 2018-05-03 02:15:56.917942293 +0900 --- channels/chan_sip.c 2018-05-03 02:20:34.568461720 +0900 *************** *** 15122,15127 **** --- 15122,15133 ---- pidfstate = "busy"; pidfnote = "On hold"; break; + case AST_EXTENSION_IUSE: + statestring = "I-use"; + local_state = NOTIFY_INUSE; + pidfstate = "busy"; + pidfnote = "I-use"; + break; case AST_EXTENSION_NOT_INUSE: default: /* Default setting */