Incoming caller id not working correctly

Hi,

I have a very strange problem in my asterisk. We have an asterisk which contains Mexican and American DIDs. Everything was working excellent until last Friday. Since then all incoming calls have their caller ID as extension 1402 which is an extension that was deleted on Friday. Here is an extract of the log:

Apr 28 20:59:42 VERBOSE[3729] logger.c: == CDR updated on SIP/techba-6e613608
Apr 28 20:59:42 VERBOSE[3729] logger.c: – Executing Macro(“SIP/techba-6e613608”, “exten-vm|3701|3701”) in new stack
Apr 28 20:59:42 VERBOSE[3729] logger.c: – Executing Macro(“SIP/techba-6e613608”, “user-callerid”) in new stack
Apr 28 20:59:42 DEBUG[3729] pbx.c: Function result is '9155779466’
Apr 28 20:59:42 DEBUG[3729] pbx.c: Function result is '9155779466’
Apr 28 20:59:42 VERBOSE[3729] logger.c: – Executing NoOp(“SIP/techba-6e613608”, “user-callerid: 9155779466 9155779466”) in new stack
Apr 28 20:59:42 DEBUG[3729] app_macro.c: Executed application: Noop
Apr 28 20:59:42 DEBUG[3729] pbx.c: Expression result is '1’
Apr 28 20:59:42 DEBUG[3729] pbx.c: Function result is '9155779466’
Apr 28 20:59:42 DEBUG[3729] pbx.c: Function result is '9155779466’
Apr 28 20:59:42 VERBOSE[3729] logger.c: – Executing Set(“SIP/techba-6e613608”, “AMPUSER=9155779466”) in new stack
Apr 28 20:59:42 DEBUG[3729] app_macro.c: Executed application: Set
Apr 28 20:59:42 DEBUG[3729] pbx.c: Expression result is '0’
Apr 28 20:59:42 VERBOSE[3729] logger.c: – Executing GotoIf(“SIP/techba-6e613608”, “0?report”) in new stack
Apr 28 20:59:42 DEBUG[3729] pbx.c: Not taking any branch
Apr 28 20:59:42 DEBUG[3729] app_macro.c: Executed application: GotoIf
Apr 28 20:59:42 DEBUG[3729] pbx.c: Expression result is '0’
Apr 28 20:59:42 VERBOSE[3729] logger.c: – Executing GotoIf(“SIP/techba-6e613608”, “0?start”) in new stack
Apr 28 20:59:42 DEBUG[3729] pbx.c: Not taking any branch
Apr 28 20:59:42 DEBUG[3729] app_macro.c: Executed application: GotoIf
Apr 28 20:59:42 DEBUG[3729] pbx.c: Function result is '9155779466’
Apr 28 20:59:42 VERBOSE[3729] logger.c: – Executing Set(“SIP/techba-6e613608”, “REALCALLERIDNUM=9155779466”) in new stack
Apr 28 20:59:42 DEBUG[3729] app_macro.c: Executed application: Set
Apr 28 20:59:42 VERBOSE[3729] logger.c: – Executing NoOp(“SIP/techba-6e613608”, “REALCALLERIDNUM is 9155779466”) in new stack
Apr 28 20:59:42 DEBUG[3729] app_macro.c: Executed application: NoOp
Apr 28 20:59:42 DEBUG[3729] db.c: Unable to find key ‘9155779466/user’ in family 'DEVICE’
Apr 28 20:59:42 DEBUG[3729] func_db.c: DB: DEVICE/9155779466/user not found in database.
Apr 28 20:59:42 DEBUG[3729] pbx.c: Function result is ''
Apr 28 20:59:42 VERBOSE[3729] logger.c: – Executing Set(“SIP/techba-6e613608”, “AMPUSER=”) in new stack
Apr 28 20:59:42 DEBUG[3729] app_macro.c: Executed application: Set
Apr 28 20:59:42 DEBUG[3729] pbx.c: Function result is '1402’
Apr 28 20:59:42 VERBOSE[3729] logger.c: – Executing Set(“SIP/techba-6e613608”, “AMPUSERCIDNAME=1402”) in new stack
Apr 28 20:59:42 DEBUG[3729] app_macro.c: Executed application: Set
Apr 28 20:59:42 DEBUG[3729] pbx.c: Expression result is '0’
Apr 28 20:59:42 VERBOSE[3729] logger.c: – Executing GotoIf(“SIP/techba-6e613608”, “0?report”) in new stack
Apr 28 20:59:42 DEBUG[3729] pbx.c: Not taking any branch
Apr 28 20:59:42 DEBUG[3729] app_macro.c: Executed application: GotoIf
Apr 28 20:59:42 DEBUG[3729] pbx.c: Function result is '1’
Apr 28 20:59:42 DEBUG[3729] pbx.c: Expression result is ‘1’

The problem is at line:
Apr 28 20:59:42 DEBUG[3729] pbx.c: Function result is ‘1402’

In previous logs, the line looked like:
Apr 28 20:59:42 DEBUG[3729] pbx.c: Function result is ‘’

and then everything worked correctly.

Any ideas?

Can you post the contents of your context and macro’s used for your outbound dialing? it might make it easy to see the problem. The line below looks to be what you need to prevent from occurring.