[asterisk-users] AMI Newstate Ringing events -- Inconsistent caller id ?
Ex Vito
ex.vitorino at gmail.com
Fri Nov 23 16:56:40 CST 2007
On Nov 23, 2007 6:58 PM, Moises Silva <moises.silva at gmail.com> wrote:
>
> I added the senddialevent, but not the condition you see below. That
> one was added by someone else. It seems that determine wheter or not
> the current extension will be set for outgoing calls. Setting
> OPT_ORIGINAL_CLID may fix your problem.
>
That goes to explaining a few things - great. :-)
I've checked UPGRADE.txt from asterisk-1.2.x source and it's clearly
documented; I also checked the mailing list discussion you mentioned
and other info.
In short: it has been decided that the "Newstate Ringing" event (1) for the
destination channel should have the clid associated to the exten for that
dest channel by default... ok. The 'o' option for the Dial()
application provides
older 1.0 behaviour where such event will hold the caller id for the call
originator.
(1 - and probably others, but in this context, this is the relevant one)
So it seems we're left with two paths:
1. Add the 'o' option to all Dials() and monitor exclusively
"Newstate Ringing"
events
2. Forget the 'o' option in Dials(), and monitor both "Newstate Ringing" and
"Dial" events which contain all the needed info.
I'm really not sure what is the best -- my initial testing for both 1. and 2.
gives the same results, but following 1. seems to be less "future-proof".
Any opinions ?
But then, there is at least one circunstace where there is no "Dial" event;
that's when the "Newstate Ringing" events are triggered by the queues !
Fortunately, in these cases, the "Newstate Ringing" event contains the
"originator clid"...
Aargh !... I hate inconsistencies. :-///
>
> Olle makes a joke about something that is very true. Dial() is
> monster. So you might have found a bug, since the 'o' option does not
> explain why the Dial event is generated before/after newstate events
> for some technologies and other inconsistencies you mentioned.
>
Yep... Honestly, after having understood the reason why some of my
"Newstate Ringing" events didn't contain the info I expected and how
I can deal with that by resorting to track the "Dial" events, this is what
worries me the most.
--> Why on earth do I get "Newstate Ringing" events before the respective
"Dial" events ?!
Of course (luckily ?!), again, in these cases, the "Newstate Ringing"
event contains the originator caller id information... since it is the snippet
of code that Moises pasted to his message, in Dial() app, that does the
trick and, apparently, it hasn't been run yet ! (go figure...)
>
> By the way. I just wrote an application that allow to execute AGI
> using the Manager interface, so that might be helpful for you.
>
> http://bugs.digium.com/view.php?id=11282
>
I'll have a look...
>
> Hope this post helps you a bit.
>
It sure did ! Thanks a lot.
--
exvito
More information about the asterisk-users
mailing list