Summary:ASTERISK-08284: app_dial setting callerid to ${EXTEN} too soon
Reporter:Philipp Dunkel (pdunkel)Labels:
Date Opened:2006-12-05 15:21:05.000-0600Date Closed:2007-01-12 22:22:46.000-0600
Versions:Frequency of
Environment:Attachments:( 0) sample.extensions.conf
Description:When using Dial with the o flag, the callerid sent to the outbound leg should be that sent by the incoming leg. However, the callerid is still set to the extension doing the dialing.
Comments:By: Jason Parker (jparker) 2006-12-05 16:48:10.000-0600

Can you post pieces of your dialplan, to show how the call is getting to you?  End-to-end if possible.

By: Philipp Dunkel (pdunkel) 2006-12-06 02:29:32.000-0600

I uploaded an example for extensions.conf. It's basically 2 SIP Phones registering and having a context of default. Although this is part of a larger dialplan, What I uploaded shows a complete call, since one of the SIP-Phones can call the other directly. I didn't remove any "dialplan magic" or modify the extensions at all since I didn't want to remove any possible side effects.

As a Test I even uset Verbose(${CALLERID(NUM)} is calling ${EXTEN}) which showed everything to be correct. i.e. Both CALLERID(NUM) and EXTEN have the correct values.

When the call is placed I receive the value of ${EXTEN} as the Callerid on the phones (Snom 360).

Please also note that although I have the Dial-Options Rrfo here, I have tried this without the f as well without any difference in result.

I will go through the code for this in more detail and try to find the bug as well. So if you have any thoughts on what the casue might be, add a note here so we don't duplicate effort.

Thx, Phil

By: Joshua C. Colp (jcolp) 2006-12-06 09:54:34.000-0600

If you remove 'o' does it work as expected? Just curious really.

By: Philipp Dunkel (pdunkel) 2006-12-06 10:44:13.000-0600

Well I guess that depends on what you expect :)

It does the same thing as with the o i.e.: The phone gets the ${EXTEN} instead of ${CALLERID(NUM)}

What I would expect is that i get ${CALLERID(NUM)} but as I said according to http://www.voip-info.org/wiki-Asterisk+cmd+Dial i am the only one expecting that since 1.2

The strange thing is that I had "my expected behaviour" even with 1.2.13 and only since 1.4.x has the bahaviour changed.

Greetings, Philipp

By: Joshua C. Colp (jcolp) 2006-12-06 10:46:01.000-0600

That's the weird part, I'm running trunk and 1.4 and it works fine for me - callerid does as you want. That's the weird part...

By: Philipp Dunkel (pdunkel) 2006-12-06 13:18:01.000-0600

After having gotten the following URL from russelb: http://lists.digium.com/pipermail/asterisk-dev/2006-November/024501.html

I understand waht was intended here a lot better.


This is not a bug about the Option o, which may or may not work, but rather a bug in app_dial, that the caller_id is being set at the wrong point in time.

It seems that the CallerID is being set before the ast_call() to ${EXTEN} thereby sending the wrong caller id to the Called phone.

I will attempt to go through the code and verify this.

Greetings, Philipp

By: Joshua C. Colp (jcolp) 2006-12-18 20:59:21.000-0600

I believe I have tracked down the cause. What happens if you remove both 'o' and 'f' from your Dial line? Does the desired behavior occur?

By: Philipp Dunkel (pdunkel) 2006-12-19 01:16:04.000-0600

@file: No, that was my initial setting. Both the o and the f were attempts to correct this behaviour.

I filed this bug as a bug of o originally because I was confused by the voip-ino.org docs and what was expected behaviour. Thinking that I had to use an o while all the while the was wa bug to begin with.

By: Joshua C. Colp (jcolp) 2007-01-12 22:22:45.000-0600

Closing this out since I believe the issue was just a misunderstanding on expected behavior. If there is still a bug present - please reopen. Thanks!