[asterisk-dev] Error loading module 'chan_sip.so': /usr/lib/asterisk/modules/chan_sip.so: un defined symbol

shalu dhamija shalu.dhamija at rancoretech.com
Mon Nov 21 03:45:02 CST 2011



Hello, 

I am using asterisk-1.8.7.1 for the voicemail service. While running  the executable of asterisk I am facing problem in loading of SIP channel module. Following error is coming: 


Error loading module 'chan_sip.so': /usr/lib/asterisk/modules/chan_sip.so: undefined symbol: vms_cli_delete_peer_cb 


The code snippet is as follows: 


chan_sip.c 


extern char (*vms_cli_delete_peer_cb)(struct vms_ast_cli_args *a, char *cli_disp); 

static char *vms_cli_delete_peer(struct vms_ast_cli_args *a, char *cli_disp); 



static int load_module(void) 

{ 

 //  Full code of load_module function is not mentioned here. I have mentioned my changes and also the lines(which were already present in version 1.8.7.1) above and below my changes. 

  /* Register dialplan functions */ 
        ast_custom_function_register(&sip_header_function); 
        ast_custom_function_register(&sippeer_function); 
        ast_custom_function_register(&sipchaninfo_function); 
        ast_custom_function_register(&checksipdomain_function);  

  vms_cli_delete_peer_cb = (void*) vms_cli_delete_peer;  


 /* Register manager commands */ 
        ast_manager_register_xml("SIPpeers", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_sip_show_peers); 
        ast_manager_register_xml("SIPshowpeer", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_sip_show_peer); 



............................................................................................................................................................................... 


} 



vms_cli.c 


char (*vms_cli_delete_peer_cb)(struct vms_ast_cli_args *a, char *cli_disp);  


static uns32 vms_cef_delete_peer(NCSCLI_ARG_SET *arg, NCSCLI_CEF_DATA *data) 
{ 
        char cli_disp_info[2000] = ""; 
        uns32 rc = NCSCC_RC_SUCCESS; 
  
        PREPARE_VMS_CLI_ARGS(1, arg); 
        if(vms_cli_delete_peer_cb) 
        { 
        vms_cli_delete_peer_cb(&vms_args, cli_disp_info); 
        rc = vms_cli_display(data->i_bindery->i_cli_hdl,(uns8*)cli_disp_info); 
        } 
        return vms_cli_done(data->i_bindery->i_cli_hdl, rc); 
} 



I am facing similar issues in other modules also. 

The above piece of code was working fine with asterisk version  1.6.0.1 

messages log file of asterisk is attached with this mail. 

Please provide your comments on this issue as i am not able to proceed further. 



Thanks. 

Regards, 

Shalu 




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20111121/dfa2e659/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: messages.zip
Type: application/x-zip-compressed
Size: 19730 bytes
Desc: not available
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20111121/dfa2e659/attachment-0001.bin>


More information about the asterisk-dev mailing list