Summary: | ASTERISK-12211: CallerID missing on IAX channels | ||
Reporter: | Dmitry Andrianov (dimas) | Labels: | |
Date Opened: | 2008-06-17 09:44:50 | Date Closed: | 2008-07-14 18:51:26 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Channels/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 20080714__bug12875.diff.txt | |
Description: | I have realtime IAX2 users, everybody have a fullname configured. ZoIPer softphone used to originate calls. I have found that: 1. If callerid fields in the zoiper configuration are empty, Asterisk does NOT provide any callerid for calls originated by the softphone - the called party sees "unknown" 2. If i put ANY text into zoiper's callerid fields, Asterisk actually uses fullname configured for the correspondign user. I believe this is wrong and Asterisk should ALWAYS use cidnum/fullname configured in iax.conf/realtime then they are configured. ****** ADDITIONAL INFORMATION ****** I did not dig too much into the subject but I think that offending code is in channel_iax2.c: /* If they have callerid, override the given caller id. Always store the ANI */ if (!ast_strlen_zero(iaxs[callno]->cid_num) || !ast_strlen_zero(iaxs[callno]->cid_name)) { if (ast_test_flag(user, IAX_HASCALLERID)) { iaxs[callno]->calling_tns = 0; iaxs[callno]->calling_ton = 0; ast_string_field_set(iaxs[callno], cid_num, user->cid_num); ast_string_field_set(iaxs[callno], cid_name, user->cid_name); iaxs[callno]->calling_pres = AST_PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN; } if (ast_strlen_zero(iaxs[callno]->ani)) ast_string_field_set(iaxs[callno], ani, user->cid_num); } else { iaxs[callno]->calling_pres = AST_PRES_NUMBER_NOT_AVAILABLE; } I do not understand why user->cid_num / user->cid_name are only used in the case call have callerid. To me they should be used always. Since I do not quite understand the logic here, I'm not going to fix it (I'm not even sure this piece of code is really involved into my problem). | ||
Comments: | By: Tilghman Lesher (tilghman) 2008-07-14 18:26:49 I believe you're correct, but I'm going to check with some others to be sure. By: Digium Subversion (svnbot) 2008-07-14 18:51:25 Repository: asterisk Revision: 130889 U branches/1.4/channels/chan_iax2.c ------------------------------------------------------------------------ r130889 | tilghman | 2008-07-14 18:51:23 -0500 (Mon, 14 Jul 2008) | 8 lines Override the callerid in all cases when the callerid is set in the user, not just when a remote callerid is set. Also, if not set in the user, allow the remote CallerID to pass through. (closes issue ASTERISK-12211) Reported by: dimas Patches: 20080714__bug12875.diff.txt uploaded by Corydon76 (license 14) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=130889 |