[Home]

Summary:ASTERISK-07029: Call initiated by Callfile - Calleridnum changed by Dialplan - DISA resets to original
Reporter:Christian Benke (christianbee)Labels:
Date Opened:2006-05-24 04:10:57Date Closed:2011-06-07 14:03:19
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_zap
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) callback_dialplan.txt
( 1) callback_test.agi
( 2) callback_verbose_debug_2.txt
( 3) callback_verbose_debug_3.txt
( 4) callback_verbose_debug_updated.txt
( 5) mvcallback20060524110502499644000.call
Description:I stumbled over this problem while implementing a callback-feature.
The scenario i want is the following:
Cell phone calls a servicenumber(Call 1) and then the call is hungup. Asterisk calls back(Call 2, Leg 1, Callerid is the servicenumber) and provides the called person with the disa dialtone where he can dial a final destination(Call 2, Leg 2). The final destination sees the callerid of the cell phone.

In the background, Call 1 starts a DeadAGI which creates a callfile and moves it to the outgoing-directory. Asterisk then calls the cell-phone(Call 2, Leg 1, the cellphone-number has been saved in the call-file, the callerid is set to the serviceno) and jumps to a context(callback_test), where the callerid is changed to the callerid of the cellphone, then we proceed to the disa-context(callback_disa) and the cellphone-user can dial where he wants to go(Call 2, Leg 2).

Unfortunately, changing the calleridnum from the serviceno to the cellphone-cli doesn't work as expected.

It is possible to set it in the callback_test-context, but after the callback_disa-context, it is automatically reset to the serviceno-cli again.
This only happens when the call was initiated by a callfile, when it is a direct call, the callerid can be overwritten and is not reset by the disa application.

I've also tried to set the Calleridnumber with the ani-flag as well as the deprecated SetCIDNum-application, no changes.

When no cli is set in the callfile, the callerid is not overwritten by the disa application afterwards. Unfortunately, the cellphone-user doesn't see the serviceno-cli in this case.

I've attached the relevant(simplified) dialplans(callback_dialplan.txt), the agi-script(callback_test.agi), the verbose debug(callback_verbose_debug.txt) and a sample callfile(mvcallback20060524110502499644000.call), hth.

regards
christian
Comments:By: Christian Benke (christianbee) 2006-05-24 04:20:58

sorry, callback_verbose_debug.txt has wrong data, please delete, thx.  callback_verbose_debug_updated.txt is the correct version.

By: Joshua C. Colp (jcolp) 2006-05-26 10:26:27

Can you try using dialplan functions instead? The applications are deprecated.. Examples:

Set(CALLERID(num)=8005558355)
Set(CALLERID(name)=8005558355)

Thanks.

By: Tilghman Lesher (tilghman) 2006-05-26 12:59:41

Analysis:  this is caused by the chan_zap needcallerid flag on the subchannel.  Apparently it is not getting reset when we initiate the call via pbx_spool.  Someone will need to take a look at this in more detail to figure out if/how it can be fixed.

By: Christian Benke (christianbee) 2006-05-26 13:26:48

sorry, when i discovered this i was using the function but changed it to the apps later to see if it makes a difference.
i've repeated the test so you see the result, check callback_verbose_debug_2.txt for details, no changes...

thx for the feedback

By: Serge Vecher (serge-v) 2006-06-07 15:53:50

christianbee: what version of trunk is this? hopefully the very latest.

By: Christian Benke (christianbee) 2006-06-09 10:18:34

sorry, but the bug still exists after update to 1.2.9.1(was 1.2.7.1 before), see attached callback_verbose_debug_3.txt



By: Serge Vecher (serge-v) 2006-09-01 12:24:08

ok, we need to do something with this guy (bug).

By: jmls (jmls) 2006-10-31 12:35:35.000-0600

yeah, and what is going to be done by whom ?

By: jmls (jmls) 2006-12-10 08:06:35.000-0600

*cough*. developers, can we confirm that this is a bug ? Thanks.

By: Scott Keagy (skeagy) 2007-02-25 17:05:45.000-0600

I'm using Asterisk 1.2.14 and Zaptel 1.2.12, and this is still an issue.

I've been beating my head against it in a different way...

I use a .call file to call out to party A, then pass to a context that ends up calling out to party B. I've tried setting CALLERID(num), CALLERID(ani), SetCID, etc... all with the same result.

No matter what I set the ani or callerid values to in the dialplan before calling out to party B (and even verification with NoOp statements shows the variables are properly set), the call out to party B always sees party A's number as the CallerID.

Seems like Corydon76 identified the core issue nearly a year ago...

Is this fixed in Asterisk 1.4 ??

By: Serge Vecher (serge-v) 2007-02-26 10:38:31.000-0600

murf, since you've been working on callerid stuff lately, may I ask you to look at this?

By: Serge Vecher (serge-v) 2007-03-30 10:13:51

murf, sorry to be pushy, but since you have cdr work off your back ...

By: Dwayne Hubbard (dhubbard) 2007-04-05 14:18:44

I'm closing this issue with no trouble found.  I am able to do the following:

SCENARIO:

FXS Phone ---> calls into Asterisk ---> call#1

Asterisk ----> calls original caller back --> call#2, leg 1

Asterisk ----> calls leg2 via DISA ---> call#2, leg 2

call#2, leg 1 - uses the "asterisk <12345>" CallerID
call#2, leg 2 - uses the call#1 CallerID

-------------------------------

RESULT:

This was tested successfully on 1.2, 1.4, and trunk

-------------------------------

CONFIGURATION:

I used a TDM400P with FXS daughtercards.  I did slightly modify the reporter's dialplan to the following:

[issue7218_default]
exten => 123456,1,Set(TIMEOUT(digit)=5)
exten => 123456,n,Set(TIMEOUT(response)=15)
exten => 123456,n,Authenticate(321)
exten => 123456,n,NoOp(CALLERIDNUM=${CALLERID(num)} CALLERIDNAME=${CALLERID(name)})
exten => 123456,n,DeadAGI(callback/callback_test.agi,${CALLERID(num)})
exten => 123456,n,Hangup

[callback_test]
exten => _X.,1,Set(CALLERID(num)=${EXTEN})
exten => _X.,n,Set(CALLERID(name)=${EXTEN})
exten => _X.,n,NoOp(CALLERIDNUM=${CALLERID(num)} CALLERIDNAME=${CALLERID(name)})
exten => _X.,n,Goto(callback_disa,s,1)
exten => _X.,n,Hangup

[callback_disa]
exten => s,1,NoOp(CALLERIDNUM=${CALLERID(num)} CALLERIDNAME=${CALLERID(name)})
exten => s,n,Set(TIMEOUT(digit)=5)
exten => s,n,Set(TIMEOUT(response)=15)
exten => s,n,Authenticate(321)
exten => s,n,DISA(no-password|callback_disa_auth)

[callback_disa_auth]
exten => _X.,1,NoOp(CALLERIDNUM=${CALLERID(num)} CALLERIDNAME=${CALLERID(name)})
exten => _X.,n,Dial(Zap/1/${EXTEN})