Syntax of "t_uac_cancel" : callid cseq */
| 589 | cseq |
| 590 | */ |
| 591 | mi_response_t *mi_tm_cancel(const mi_params_t *params, |
| 592 | struct mi_handler *async_hdl) |
| 593 | { |
| 594 | struct cell *trans; |
| 595 | str callid, cseq; |
| 596 | branch_bm_t cancel_bitmap = BRANCH_BM_ALL; |
| 597 | |
| 598 | if (get_mi_string_param(params, "callid", &callid.s, &callid.len) < 0) |
| 599 | return init_mi_param_error(); |
| 600 | if (get_mi_string_param(params, "cseq", &cseq.s, &cseq.len) < 0) |
| 601 | return init_mi_param_error(); |
| 602 | |
| 603 | if( t_lookup_callid( &trans, callid, cseq) < 0 ) |
| 604 | return init_mi_error( 481, MI_SSTR("No such transaction")); |
| 605 | |
| 606 | /* cancel the call */ |
| 607 | LM_DBG("cancelling transaction %p\n",trans); |
| 608 | |
| 609 | cancel_uacs( trans, cancel_bitmap/*all branches*/); |
| 610 | |
| 611 | UNREF(trans); |
| 612 | |
| 613 | return init_mi_result_ok(); |
| 614 | } |
| 615 | |
| 616 | |
| 617 | /* |
nothing calls this directly
no test coverage detected