[asterisk-dev] Another dial-option, catching hangup of caller party
Johan Wilfer
johan at wilfer.se
Tue Feb 19 14:26:28 CST 2008
Could someone who knows app_dial.c better than I look at this?
It's a very small patch... See bug #0011954
> >>> I wonder will this work with queues. I suspect that queue will try to
> >>> terminate created channel, or at least update some log.
> > I also meant the local channels that issue Dial. However i think,
> > there's the difference, because call is bridged trough queue, so queue
> > would first get notification when caller hanged up. If you intend to
> > use it in queue, can you give us an update when you'll have it
> > working?
> >
> When dial() is called directly outside of queue, it works.
> In the queue it only works if /n is appended to the local channel,
> otherwise it doesn't.
>
> Why this is so and what it means I don't really understand. When I use
> the G-flag I don't need to
> specify /n after the local channel.
>
>
> I've done some tests and I'm very satisfied with the results. I've
> encounterd one strange side effect however:
> I got this message when using the new flag:
> [Feb 11 16:30:44] NOTICE[22370]: app_dial.c:1845 dial_exec_full: PEER
> context: incoming; PEER exten: ; PEER priority: 1
>
> The line's in question are these:
> --------------------------------------------------------------
> 1844: if (ast_test_flag64(&opts, OPT_PEER_H)) {
> 1845: ast_log(LOG_NOTICE, "PEER context: %s; PEER
> exten: %s; PEER priority: %d\n",
> 1846: peer->context, peer->exten,
> peer->priority);
> 1847: }
> --------------------------------------------------------------
>
> From my patch:
> --------------------------------------------------------------
> @@ -262,12 +264,13 @@
> OPT_CALLEE_GOSUB = (1 << 28),
> OPT_CALLEE_MIXMONITOR = (1 << 29),
> OPT_CALLER_MIXMONITOR = (1 << 30),
> + OPT_CALLEE_GO_ON = (1 << 31),
> };
>
> -#define DIAL_STILLGOING (1 << 31)
> -#define DIAL_NOFORWARDHTML ((uint64_t)1 << 32) /* flags are now
> 64 bits, so keep it up! */
> -#define OPT_CANCEL_ELSEWHERE ((uint64_t)1 << 33)
> -#define OPT_PEER_H ((uint64_t)1 << 34)
> +#define DIAL_STILLGOING ((uint64_t)1 << 32)
> +#define DIAL_NOFORWARDHTML ((uint64_t)1 << 33) /* flags are now
> 64 bits, so keep it up! */
> +#define OPT_CANCEL_ELSEWHERE ((uint64_t)1 << 34)
> +#define OPT_PEER_H ((uint64_t)1 << 35)
>
> enum {
> OPT_ARG_ANNOUNCE = 0,
> --------------------------------------------------------------
>
> Right now my patch has to be applied manually because a whitespace
> commit since yesterday.
And this one?
> Can someone explain why almost every flags are defined inside an enum
> but some are #define:
> DIAL_STILLGOING, DIAL_NOFORWARDHTML, OPT_CANCEL_ELSEWHERE, OPT_PEER_H
/Johan
More information about the asterisk-dev
mailing list