Asterisk Call-ID Issue


#1

Hi, I am new to using asterisk and I am having issues connecting to pstn from asterisk and my service provider says the syntax for the call-id field in the SIP header is not in the specified format as in rfc 3261.

Is it possible to make this modification in asterisk and what file can be modified (or how do I make this modification)? currently my call-id value from the SIP header shows only the localid part without the ‘@host’. All help would be appreciated.

Thanks


#2

You are connecting the PSTN then what is the use of SIP ?
PSTN you have digital or analog.


#3

Asterisk cannot generate a call-ID without an @ and would need to be seriously misconfigured not to include a host name (taken from 1.6.1.0):

[code]/*! \brief Build SIP Call-ID value for a non-REGISTER transaction */
static void build_callid_pvt(struct sip_pvt *pvt)
{
char buf[33];

    const char *host = S_OR(pvt->fromdomain, ast_inet_ntoa(pvt->ourip.sin_addr));
    
    ast_string_field_build(pvt, callid, "%s@%s", generate_random_string(buf, sizeof(buf)), host);

}

/*! \brief Build SIP Call-ID value for a REGISTER transaction */
static void build_callid_registry(struct sip_registry *reg, struct in_addr ourip, const char *fromdomain)
{
char buf[33];

    const char *host = S_OR(fromdomain, ast_inet_ntoa(ourip));

    ast_string_field_build(reg, callid, "%s@%s", generate_random_string(buf, sizeof(buf)), host);

}
[/code]

As well as agreeing that a PSTN interface would not have an RFC 3261 Call-ID, I would say that asterisk definitely was RFC 3261 compliant for SIP interfaces.