Summary:ASTERISK-02393: call-id header with FQDN or externip
Reporter:cherso (cherso)Labels:
Date Opened:2004-09-12 15:01:10Date Closed:2008-01-15 15:07:20.000-0600
Versions:Frequency of
Description:Should be nice to replace the ip address with a string.
for example
Call-ID: s7382jhskjhf@mydomain.com
Call-ID: s7382jhskjhf@externip (unresolved)

This should be a good workaround for the draytek vigor 2600 packet inspection bug
Comments:By: Brian West (bkw918) 2004-09-12 15:04:10

It should take both.. whats the RFC say about this?

By: Brian West (bkw918) 2004-09-12 20:22:38

accually I think you can put FQDN in the externip field.

Try it and let me know..

By: cherso (cherso) 2004-09-13 02:30:24

yes you can. Asterisk is resolving the externip fqdn first and then creates the call-id header with the external ip address.
Vigor 2600 changes this ip address with private ip address, so the call is not accepted.

Using the fqdn (the "fromdomain" option for example) instead the ip address would be a good workaround.
RFCs just talk about a token in the Call-ID header

By: cherso (cherso) 2004-09-13 06:35:28

I know it's a vigor 2600 bug, but I need to change the chan_sip.c this way to remove the externip ip address from the call-id header.
when the sip packet comes back the call-id header got the local ip address. The vigor 2600 is doing a packet inspection and changes the externip to the local ip address, so the outgoing sip invite packet is different from the incoming sip ack packet. :-(
RFC could accept the "fromdomain" in the call-id header
I will try to patch the callid_build function adding this feature ok?

/*--- build_callid: Build SIP CALLID header ---*/
static void build_callid(char *callid, int len, struct in_addr ourip)
       int res;
       int val;
       int x;
       char iabuf[INET_ADDRSTRLEN];
       for (x=0;x<4;x++) {
               val = rand();
               res = snprintf(callid, len, "%08x", val);
               len -= res;
               callid += res;
       /* It's not important that we really use our right IP here... */
/*      snprintf(callid, len, "@%s", ast_inet_ntoa(iabuf, sizeof(iabuf), ourip))

edited on: 09-13-04 06:37

By: Mark Spencer (markster) 2004-09-13 08:15:28

I suppose using the "fromdomain" for the callid is fine, if it's specified.

By: Mark Spencer (markster) 2004-09-13 08:30:27

Fixed and tested in CVS with both globals and per-peer fromdomains.

By: Digium Subversion (svnbot) 2008-01-15 15:07:19.000-0600

Repository: asterisk
Revision: 3769

U   trunk/channels/chan_sip.c

r3769 | markster | 2008-01-15 15:07:19 -0600 (Tue, 15 Jan 2008) | 2 lines

Use fromdomain in creating callid if specified (bug ASTERISK-2393)



By: Digium Subversion (svnbot) 2008-01-15 15:07:20.000-0600

Repository: asterisk
Revision: 3770

U   trunk/channels/chan_sip.c

r3770 | markster | 2008-01-15 15:07:20 -0600 (Tue, 15 Jan 2008) | 2 lines

Work with globals too (bug ASTERISK-2393)