Dev-scatch: Difference between revisions
Line 3: | Line 3: | ||
== Asterisk == | == Asterisk == | ||
=== No events for recording/live/pause === | |||
Because there's no events for pause/unpause, it's hard to know the recording was puased or not. | |||
=== POST /channels/<channelId>/dtmf doing wrong === | === POST /channels/<channelId>/dtmf doing wrong === | ||
When it's getting the negative duration/between, it doesn't accept the call hangup. | When it's getting the negative duration/between, it doesn't accept the call hangup. |
Revision as of 13:05, 10 February 2020
Overview
Simple development scatch for myself.
Asterisk
No events for recording/live/pause
Because there's no events for pause/unpause, it's hard to know the recording was puased or not.
POST /channels/<channelId>/dtmf doing wrong
When it's getting the negative duration/between, it doesn't accept the call hangup.
POST /channels codec not in order
When the ARI application originating the channel with ARI, it doesn't respect the codec order in /etc/asterisk/pjsip.conf file.
Fixing Dial event
For the first Dial ARI event, it comes with dialstate: "", always.
This should be fixed to dialsatate: "initial" something.
The Dial application doesn't send the DialEnd event.
This is fine. It was already explained.
Make reason for mandatory
Currently, the Asterisk doesn't set the reason field as a requirement. It makes hard to use the ChannelHangupRequest and ChannelDestroyed event.
Add more Hangup reason
Currently, DELETE /ari/channels/<channelID> supports only few hangup reason.
res/ari/resource_channels.c <source lang=c> if (ast_strlen_zero(args->reason) || !strcmp(args->reason, "normal")) { cause = AST_CAUSE_NORMAL; } else if (!strcmp(args->reason, "busy")) { cause = AST_CAUSE_BUSY; } else if (!strcmp(args->reason, "congestion")) { cause = AST_CAUSE_CONGESTION; } else if (!strcmp(args->reason, "no_answer")) { cause = AST_CAUSE_NOANSWER; } else if(!strcmp(args->reason, "answered_elsewhere")) { cause = AST_CAUSE_ANSWERED_ELSEWHERE; } else { ast_ari_response_error( response, 400, "Invalid Reason", "Invalid reason for hangup provided"); return; } </source>