Asterisk 13 - Address Family mismatch between source

Friends, I am NOTICE CLI in Asterisk 13:

[Nov 14 23:10:57] NOTICE[5009]: res_hep.c:418 hep_queue_cb: Unable to send packet: Address Family mismatch between source/destination

Any idea?

You probably received an IPv6 address when your system only supports IPv4.

I have the same issue and I’m assuming it’s the D40’s that have ipv6 enabled. I’m configuring them using DPMA, how would I turn that off so it doesn’t happen any longer? This only seems to happen during calls.

The Digium phones don’t do IPv6 in current firmware. res_hep is part of the HEP (Homer Encapsulation Protocol) module support that’s new in Asterisk 13.


I have to assume I’m not using it (intentionally anyway) as this is an upgrade of a 1.8 system that had a hardware failure. Any problem with unloading it so I don’t get the ugly messages across my CLI?

Nope, no problem with unloading it. Unless you’ve got a HEP Capture server already on your network, it won’t help you. HEP’s pretty neat though, so you and anyone else reading this should investigate it at a later date.


Thanks for the info, and will do.

I am trying to setup Homer/Sipcapture and I am getting this error, but would like to resolve it. I am not seeing any packets from through on my sipcapture server from asterisk when running tcpdump and getting this error (I am able to ping it so there is connectivity between the machines). So, it seems that asterisk isn’t even sending the packet because of the mismatch, but I don’t know what the mismatch could be. Is there a setting that I’m missing?


Here is my hep.conf file:

; res_hep Module configuration for Asterisk

; All settings are currently set in the general section.
enabled = yes                                         ; Enable/disable forwarding of packets to a
                                                             ; HEP server. Default is "yes".
capture_address = [ip address]:9060     ; The address of the HEP capture server.
capture_password = myHep                    ; If specified, the authorization passsword
                                                             ; for the HEP server. If not specified, no
                                                             ; authorization password will be sent.
capture_id = 2001                                  ; A unique integer identifier for this
                                                             ; server. This ID will be embedded sent
                                                             ; with each packet from this server.

I was trying to reading this the code for the hep_queue_cb function, but I can’t quite figure out what it’s saying (aka I don’t know any C). But, here is the function if someone else has insights:

hep_queue_cb function

static int hep_queue_cb(void *data)
	RAII_VAR(struct module_config *, config, ao2_global_obj_ref(global_config), ao2_cleanup);
	RAII_VAR(struct hepv3_runtime_data *, hepv3_data, ao2_global_obj_ref(global_data), ao2_cleanup);
	RAII_VAR(struct hepv3_capture_info *, capture_info, data, ao2_cleanup);
	struct hep_generic hg_pkt;
	unsigned int packet_len = 0, sock_buffer_len;
	struct hep_chunk_ip4 ipv4_src, ipv4_dst;
	struct hep_chunk_ip6 ipv6_src, ipv6_dst;
	struct hep_chunk auth_key, payload, uuid;
	void *sock_buffer;
	int res;

	if (!capture_info || !config || !hepv3_data) {
		return 0;

	if (ast_sockaddr_is_ipv4(&capture_info->src_addr) != ast_sockaddr_is_ipv4(&capture_info->dst_addr)) {
		ast_log(AST_LOG_NOTICE, "Unable to send packet: Address Family mismatch between source/destination\n");
		return -1;

	packet_len = sizeof(hg_pkt);

What does ‘mismatch’ mean? Is it an issue with the port? I see that it’s a socket error, so is it sending from port 5060 to 9060 and that’s causing the issue? I’m not sure where asterisk sends the HEP packets from, is this something I need to configure?

Any help would be greatly appreciated!