[asterisk-bugs] [Asterisk 0010592]: Variables set in an IAX2 user/friend no longer make it to the channel created for an (authenticated?) incoming call

noreply at bugs.digium.com noreply at bugs.digium.com
Wed Aug 29 09:44:59 CDT 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=10592 
====================================================================== 
Reported By:                stevedavies
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   10592
Category:                   Channels/chan_iax2
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Asterisk Version:            SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 81292 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             08-29-2007 08:04 CDT
Last Modified:              08-29-2007 09:44 CDT
====================================================================== 
Summary:                    Variables set in an IAX2 user/friend no longer make
it to the channel created for an (authenticated?) incoming call
Description: 

In current SVN trunk, setvars done in a user/friend definition in
iax2.conf do not make it to the created channel for an incoming IAX calls. 
(Possibly, only for authenticated calls).

I suspect this is a side effect of the changes made in bug
http://bugs.digium.com/view.php?id=9315

Here's logs showing the problem (including some extra tracing that I
added):

[Aug 29 14:54:27] VERBOSE[5972] logger.c: [Aug 29 14:54:27] Rx-Frame
Retry[ No] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: NEW    
[Aug 29 14:54:27] VERBOSE[5972] logger.c: [Aug 29 14:54:27]    Timestamp:
00003ms  SCall: 12056  DCall: 00000 [41.241.31.0:4569]
[Aug 29 14:54:27] VERBOSE[5972] logger.c: [Aug 29 14:54:27]    VERSION    
    : 2
[Aug 29 14:54:27] VERBOSE[5972] logger.c: [Aug 29 14:54:27]    CALLING
NUMBER  : 0878202303
[Aug 29 14:54:27] VERBOSE[5972] logger.c: [Aug 29 14:54:27]    CALLING
NAME    : Steve Davies
[Aug 29 14:54:27] VERBOSE[5972] logger.c: [Aug 29 14:54:27]    FORMAT     
    : 1024
[Aug 29 14:54:27] VERBOSE[5972] logger.c: [Aug 29 14:54:27]    CAPABILITY 
    : 2
[Aug 29 14:54:27] VERBOSE[5972] logger.c: [Aug 29 14:54:27]    USERNAME   
    : 0878202303
[Aug 29 14:54:27] VERBOSE[5972] logger.c: [Aug 29 14:54:27]    CALLED
NUMBER   : 0216575160
[Aug 29 14:54:27] VERBOSE[5972] logger.c: [Aug 29 14:54:27]    DNID       
    : 0216575160
[Aug 29 14:54:27] VERBOSE[5972] logger.c: [Aug 29 14:54:27] 
[Aug 29 14:54:27] DEBUG[5972] chan_iax2.c: New max nontrunk callno is 11
[Aug 29 14:54:27] DEBUG[5972] chan_iax2.c: Creating new call structure 10
[Aug 29 14:54:27] DEBUG[5972] chan_iax2.c: Received packet 0, (6, 1)
[Aug 29 14:54:27] DEBUG[5972] chan_iax2.c: IAX subclass 1 received
[Aug 29 14:54:27] DEBUG[5972] chan_iax2.c: For call=10, set last=3
[Aug 29 14:54:27] VERBOSE[5972] chan_iax2.c: Best match was 0878202303
with score 0
[Aug 29 14:54:27] VERBOSE[5972] chan_iax2.c: Using user 0878202303
[Aug 29 14:54:27] VERBOSE[5972] chan_iax2.c: Setting FROM-PEER=0878202303
on call 10
[Aug 29 14:54:27] VERBOSE[5972] chan_iax2.c: Setting ACCOUNTCODE=ctel on
call 10
[Aug 29 14:54:27] VERBOSE[5972] chan_iax2.c: Setting accountcode = ctel
[Aug 29 14:54:27] DEBUG[5972] chan_iax2.c: Sending 14 on 10/12056 to
41.241.31.0:4569
[Aug 29 14:54:27] VERBOSE[5972] logger.c: [Aug 29 14:54:27] Tx-Frame
Retry[000] -- OSeqno: 000 ISeqno: 001 Type: IAX     Subclass: AUTHREQ
[Aug 29 14:54:27] VERBOSE[5972] logger.c: [Aug 29 14:54:27]    Timestamp:
00014ms  SCall: 00010  DCall: 12056 [41.241.31.0:4569]
[Aug 29 14:54:27] VERBOSE[5972] logger.c: [Aug 29 14:54:27]    AUTHMETHODS
    : 2
[Aug 29 14:54:27] VERBOSE[5972] logger.c: [Aug 29 14:54:27]    CHALLENGE  
    : -12424811
[Aug 29 14:54:27] VERBOSE[5972] logger.c: [Aug 29 14:54:27]    USERNAME   
    : 0878202303
[Aug 29 14:54:27] VERBOSE[5972] logger.c: [Aug 29 14:54:27] 
[Aug 29 14:54:27] VERBOSE[5972] logger.c: [Aug 29 14:54:27] Rx-Frame
Retry[ No] -- OSeqno: 001 ISeqno: 001 Type: IAX     Subclass: AUTHREP
[Aug 29 14:54:27] VERBOSE[5972] logger.c: [Aug 29 14:54:27]    Timestamp:
00024ms  SCall: 12056  DCall: 00010 [41.241.31.0:4569]
[Aug 29 14:54:27] VERBOSE[5972] logger.c: [Aug 29 14:54:27]    MD5 RESULT 
    : 17972f6d3ce514fed01c61c28134ef22
[Aug 29 14:54:27] VERBOSE[5972] logger.c: [Aug 29 14:54:27] 
[Aug 29 14:54:27] DEBUG[5972] chan_iax2.c: Received packet 1, (6, 9)
[Aug 29 14:54:27] DEBUG[5972] chan_iax2.c: Cancelling transmission of
packet 0
[Aug 29 14:54:27] DEBUG[5972] chan_iax2.c: IAX subclass 9 received
[Aug 29 14:54:27] DEBUG[5972] chan_iax2.c: For call=10, set last=24
[Aug 29 14:54:27] VERBOSE[5972] logger.c: [Aug 29 14:54:27]     --
Accepting AUTHENTICATED call from 41.241.31.0:
       > requested format = ilbc,
       > requested prefs = (),
       > actual format = gsm,
       > host prefs = (g729|ilbc|gsm|speex|alaw|ulaw),
       > priority = mine
[Aug 29 14:54:27] DEBUG[5972] pbx.c: Launching 'NoOp'
[Aug 29 14:54:27] VERBOSE[5972] logger.c: [Aug 29 14:54:27]     --
Executing [0216575160 at from-cust-ctel:1] NoOp("IAX2/0878202303-10",
"accountcode= FROM-PEER=") in new stack


Here you can see that the variables get copies from the user structure
into the iax2 structure (ie iaxs[callno]):

[Aug 29 14:54:27] VERBOSE[5972] chan_iax2.c: Setting FROM-PEER=0878202303
on call 10
[Aug 29 14:54:27] VERBOSE[5972] chan_iax2.c: Setting ACCOUNTCODE=ctel on
call 10

And that the accountcode in the iax2 structure is set too:

[Aug 29 14:54:27] VERBOSE[5972] chan_iax2.c: Setting accountcode = ctel

But by the time we get into the dialplan they are not there:

[Aug 29 14:54:27] VERBOSE[5972] logger.c: [Aug 29 14:54:27]     --
Executing [0216575160 at from-cust-ctel:1] NoOp("IAX2/0878202303-10",
"accountcode= FROM-PEER=") in new stack


====================================================================== 

---------------------------------------------------------------------- 
 Corydon76 - 08-29-07 09:44  
---------------------------------------------------------------------- 
No, they are not.  IAXVARs start in ies->vars and are transferred into a
datastore on the channel.  Variables from setvar are stored in user->vars
and transferred into iaxs[#].vars.  They are completely distinct lists and
they are not joined, as you have alleged. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
08-29-07 09:44  Corydon76      Note Added: 0069604                          
======================================================================




More information about the asterisk-bugs mailing list