[Asterisk-Dev] Problems with chan->context while merging feature 603 into 156

Steve Rodgers hwstar at rodgers.sdcoxmail.com
Sat Feb 14 21:59:01 MST 2004


I'm almost done merging feature 603 into feature 156, and I changed the 
contexts to be specified from external to internal. I am running into an 
issue with what is stored in chan->context in the function leave_voicemail() 
in app_voicemail.c. The fprintf function in leave_voicemail() below stores 
key variables in a text file for use later when the voicemail message is 
retrieved:


fprintf(txt,
";\n"
"; Message Information file\n"
";\n"
"[message]\n"
"origmailbox=%s\n"
"context=%s\n"
"exten=%s\n"
"priority=%d\n"
"callerchan=%s\n"
"callerid=%s\n"
"origdate=%s\n"
"origtime=%ld\n",
        ext,
        chan->context, ?????
        chan->exten,
        chan->priority,
        chan->name,
        chan->callerid ? chan->callerid : "Unknown",
        date, (long)time(NULL));



This is from msg0001.txt in the voicemail spool directory which was written by 
the fprintf code above:

origmailbox=101
context=macro-vmexten
	     ^^^^^^^^^^^^^^????!!!!
exten=s
priority=2
callerchan=IAX[zxxon at fxsd05]/1
callerid=6195555555
origdate=Sat Feb 14 07:48:01 PM PST 2004
origtime=1076816881
duration=4

The context should not be a macro. It should be the context specified in 
iax.conf right? This macro is used as an extension creation helper and has 
nothing to do with incoming contexts in my extensions.conf:

[macro-vmexten]
                                                                                                                              
exten => s,1,Dial(${ARG1}r2,20,tr)
exten => s,2,Voicemail2(u${MACRO_EXTEN})
exten => s,102,Voicemail2(b${MACRO_EXTEN})
exten => s,103,Hangup


Before I attempt to "fix" this, is there any design reason why this would not 
contain the context for the channel as specified in iax.conf, sip.conf or 
zapata.conf?

Steve.







More information about the asterisk-dev mailing list