Asterisk IMS TEL protocol for incoming calls not recognized

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

Asterisk IMS TEL protocol for incoming calls not recognized

Postby geertivp » Fri Dec 10, 2010 5:47 am

I am currently using Asterisk 1.6.

Asterisk seems NOT to support incoming TEL connections from an IMS platform.

X-Lite *does* support this type of call without issue!

Is there any possibility that Asterisk could accept a TEL incoming connection?

Do we need a specific module?


This is currently the error we get: 404 Not Found

Here you find part of an (incoming) INVITE request.

From: <tel:0987654321;phone-context=+32987654321>;tag=tag-etc
CSeq: 1 INVITE
P-Asserted-Identity: <tel:0987654321>
P-Called-Party-ID: <sip:+3212345678@...>
Diversion: <sip:+3212345678@...;user=phone>;reason="extension";privacy="off";counter=1

Using INVITE request as basis request -
Nov 13 17:52:05 NOTICE[27459]: chan_sip.c:6973 check_user_full: From address missing 'sip:', using it anyway

Nov 13 17:52:05 WARNING[27459]: chan_sip.c:6525 get_destination: Huh? Not a SIP header (tel:0987654321;phone-context=+32987654321)?

RDNIS is +3212345678
SIP/2.0 404 Not Found

It is strange that Asterisk seems to recognize the called number (see RDNIS); so why does it reject the call?

The basic problem seems to be that Asterisk only accepts SIP: in the From address and not TEL:

This way the incoming call is rejected!
geertivp
Newsterisk
 
Posts: 3
Joined: Fri Dec 10, 2010 5:31 am

Re: Asterisk IMS TEL protocol for incoming calls not recognized

Postby malcolmd » Fri Dec 10, 2010 8:06 am

Does your IMS platform have an option to connect to systems that aren't RFC 3966 compliant?
malcolmd
Moves Like Spencer
 
Posts: 3019
Joined: Wed Aug 03, 2005 3:53 pm
Location: Huntsville, AL, US

Patch for Asterisk 1.6.1.20 chan-sip.c TEL URI INVITE incomi

Postby geertivp » Mon Dec 27, 2010 3:14 pm

Actually I found out that Asterisk 1.6.1.20 is indeed not conform to the RFC 3966 standard.

I have written a patch for Asterisk 1.6.1.20 chan-sip.c to support the TEL URI INVITE standard for incoming calls. Changes in bold.

Now IMS and Asterisk are talking to each other without problems.

When there is no domain as with TEL INVITE we should set name to the calling number (I simply reversed dom and name in the original source for TEL INVITE leaving the domain blank).

parse_uri

if ((c = strchr(uri, '@')) == NULL) {
/* TEL INVITE does not have a domain */
dom = "";
name = uri;

} else {
/* SIP INVITE does have a domain */
*c++ = '\0';
dom = c;
name = uri;
}

check_user_full

if (!strncasecmp(t, "sip:", 4))
t+= 4;
else if (!strncasecmp(t, "tel:", 4))
t += 4;

else if (!strncasecmp(t, "sips:", 5))
t += 5;

if (parse_uri(of, "sip:,tel:,sips:", &of, &dummy, &domain, &dummy, &dummy, NULL)) {
ast_log(LOG_NOTICE, "From address missing 'sip:', using it anyway\n");
}

get_destination

if (!strncasecmp(uri, "sip:", 4)) {
uri += 4;
} else if (!strncasecmp(uri, "tel:", 4)) {
uri += 4;
} else if (!strncasecmp(uri, "sips:", 5)) {
uri += 5;
} else {
ast_log(LOG_WARNING, "Huh? Not a SIP header (%s)?\n", uri);
return -1;
}

make

We only need to stop Asterisk, transfer chan_sip.so to production, and restart Asterisk.

Can someone validate and incorporate these changes into the source tree for Asterisk?
geertivp
Newsterisk
 
Posts: 3
Joined: Fri Dec 10, 2010 5:31 am

Re: Asterisk IMS TEL protocol for incoming calls not recognized

Postby malcolmd » Mon Dec 27, 2010 3:16 pm

There is a section on this page:

http://www.asterisk.org/developers/bug-guidelines

about the process for adding new features to Asterisk.

Cheers.
Malcolm Davenport
Digium, Inc. | Senior Product Manager
malcolmd
Moves Like Spencer
 
Posts: 3019
Joined: Wed Aug 03, 2005 3:53 pm
Location: Huntsville, AL, US

Re: Asterisk IMS TEL protocol for incoming calls not recognized

Postby geertivp » Thu Dec 30, 2010 3:02 pm

I have posted an Issue, with a patch.

https://issues.asterisk.org/view.php?id=18549
geertivp
Newsterisk
 
Posts: 3
Joined: Fri Dec 10, 2010 5:31 am

Re: Asterisk IMS TEL protocol for incoming calls not recognized

Postby emufambirwi » Sat Jul 11, 2015 4:56 am

I have exactly the same problem, but I am a newbie, can anyone tell me how to apply the patch or how to locate the files that need editing to allow the TEL invites to be accepted by my asterisk server.
emufambirwi
Newsterisk
 
Posts: 1
Joined: Sat Jul 11, 2015 4:45 am


Return to Asterisk Support

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot], Yahoo [Bot] and 16 guests