You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
callerid.c: Parse previously ignored Caller ID parameters.
Commit f2f397c previously
made it possible to send Caller ID parameters to FXS stations
which, prior to that, could not be sent.
This change is complementary in that we now handle receiving
all these parameters on FXO lines and provide these up to
the dialplan, via chan_dahdi. In particular:
* If a redirecting reason is provided, the channel's redirecting
reason is set. No redirecting number is set, since there is
no parameter for this in the Caller ID protocol, but the reason
can be checked to determine if and why a call was forwarded.
* If the Call Qualifier parameter is received, the Call Qualifier
variable is set.
* Some comments have been added to explain why some of the code
is the way it is, to assist other people looking at it.
With this change, Asterisk's Caller ID implementation is now
reasonably complete for both FXS and FXO operation.
Resolves: #681
Copy file name to clipboardExpand all lines: include/asterisk/callerid.h
+16-2Lines changed: 16 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -190,15 +190,29 @@ int callerid_feed_jp(struct callerid_state *cid, unsigned char *ubuf, int sample
190
190
* \param cid Callerid state machine to act upon
191
191
* \param number Pass the address of a pointer-to-char (will contain the phone number)
192
192
* \param name Pass the address of a pointer-to-char (will contain the name)
193
-
* \param flags Pass the address of an int variable(will contain the various callerid flags)
193
+
* \param flags Pass the address of an int variable(will contain the various callerid flags - presentation flags and call qualifier)
194
194
*
195
195
* \details
196
196
* This function extracts a callerid string out of a callerid_state state machine.
197
197
* If no number is found, *number will be set to NULL. Likewise for the name.
198
-
* Flags can contain any of the following:
198
+
* Flags can contain any of the following: CID_PRIVATE_NAME, CID_PRIVATE_NUMBER, CID_UNKNOWN_NAME, CID_UNKNOWN_NUMBER, CID_MSGWAITING, CID_NOMSGWAITING, CID_QUALIFIER
/*! \brief Extract info out of callerID state machine. Flags are listed above
203
+
* \param cid Callerid state machine to act upon
204
+
* \param[out] number Pass the address of a pointer-to-char (will contain the phone number)
205
+
* \param[out] name Pass the address of a pointer-to-char (will contain the name)
206
+
* \param[out] flags Pass the address of an int variable (will contain the various callerid flags)
207
+
* \param[out] redirecting Pass the address of an int variable (will contain the redirecting reason, if received - presentation flags and call qualifier)
208
+
*
209
+
* \details
210
+
* This function extracts a callerid string out of a callerid_state state machine.
211
+
* If no number is found, *number will be set to NULL. Likewise for the name.
212
+
* Flags can contain any of the following: CID_PRIVATE_NAME, CID_PRIVATE_NUMBER, CID_UNKNOWN_NAME, CID_UNKNOWN_NUMBER, CID_MSGWAITING, CID_NOMSGWAITING, CID_QUALIFIER
0 commit comments