[asterisk-dev] Propagation of cidnum/cidname to the called party in Originate cmd (

Pavel Troller patrol at sinus.cz
Thu Dec 31 02:14:44 CST 2009


> In the Dial application (app_dial.c) there is an option 'o' to control
> forwarding of the callerid from the calling(A) channel to the called(B)
> channel. See what it does.

I know about it, but it's definitely not active when a Dial() application
is processing a forward part of the callback (to the target B-party exten).
It looks exactly like this:
Dial("IAX2/testomt-10363", "SIP/2155,180,KTWktwdg")
There are many flags, but not 'o'. The same command is used for regular
dialling (the same extension macro is used for callback as well as direct
calls), and there is not a problem with this.

> Is there any call to 'ast_set_callerid' in your scenario ?
> enum value OPT_ORIGINAL_CLID corrosponds to the Dial option 'o'

Yes, it is. The flow is as follows:
1) In res_clioriginate.c, ast_pbx_outgoing_exten() (in main/pbx.c) is called
with my values of cidnum and cidname in function params.
2) In ast_pbx_outgoing_exten(), ast_request_and_dial() (in main/channel.c)
is called with the CID values as parameters, again.
3) In ast_request_and_dial(), ast_set_callerid() is called this way:
ast_set_callerid(chan, cid_num, cid_name, cid_num);
There is no OPT_ORIGINAL_CLID value manipulated on neither of the places
mentioned. I've grepped it and its only occurence is in app_dial.c, which
is definitely not the reason of the problem. Possibly the flag area is not
properly cleaned when the channel structure is being created in this case ?

> Does this help?

A bit. Now my orientation in the code is better, but I still cannot find
the cause of the problem.

> -- 
> Regards,
> Prince Singh
> Drishti-Soft Solutions Pvt Ltd

With regards, Pavel.

> On Wed, Dec 30, 2009 at 11:42 PM, Pavel Troller <patrol at sinus.cz> wrote:
> > Hi!
> >  I'm trying to improve the Originate CLI command to be able to pass a
> > number
> > and name to the A-party of the call. I've successfully modified
> > res_clioriginate.c to accept two more arguments on the command line, with
> > the
> > number and name. It's working well.
> >  HOWEVER, it has a drawback. Now, the number and name entered is
> > propagating
> > also to the B-side of the call, which is unneeded and unwanted. Without the
> > num/name, A-party gets empty number and name of "Asterisk" and B-party gets
> > correct number and name of A-party. With the number/name entered, both
> > parties
> > are getting them.
> >  How to prevent this unneeded propagation ? I was unable to find the
> > program
> > code which is causing this :-(.
> >
> >  With regards, Pavel
> >

More information about the asterisk-dev mailing list