* Send a message within a dialog */
| 667 | * Send a message within a dialog |
| 668 | */ |
| 669 | int req_within(str* method, str* headers, str* body, dlg_t* dialog, |
| 670 | transaction_cb completion_cb,void* cbp,release_tmcb_param release_func) |
| 671 | { |
| 672 | if (!method || !dialog) { |
| 673 | LM_ERR("invalid parameter value\n"); |
| 674 | goto err; |
| 675 | } |
| 676 | |
| 677 | if (dialog->state != DLG_CONFIRMED) { |
| 678 | LM_ERR("dialog is not confirmed yet\n"); |
| 679 | goto err; |
| 680 | } |
| 681 | |
| 682 | if ( !( ((method->len == 3) && !memcmp("ACK", method->s, 3)) || |
| 683 | ((method->len == 6) && !memcmp("CANCEL", method->s, 6)) ) ) { |
| 684 | dialog->loc_seq.value++; /* Increment CSeq */ |
| 685 | } |
| 686 | |
| 687 | return t_uac(method, headers, body, dialog, |
| 688 | completion_cb, cbp, release_func); |
| 689 | err: |
| 690 | return -1; |
| 691 | } |
| 692 | |
| 693 | |
| 694 | /* |