summaryrefslogtreecommitdiff
path: root/channels/chan_misdn.c
AgeCommit message (Collapse)Author
2006-08-08* first bits of decoding facility information elementsNadi Sarrar
* fail on misdn_cfg_init() if elements in the config enum don't match with the config structs in misdn_config.c * implemented first bits for encoding ISDN facility information elements via ASN.1 descriptions * using unnamed semaphore for syncing in misdn_thread * advanced fax detection: configurable detect timeout and context to jump into git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-08* added possibility to change echocancel settings during callsChristian Richter
* removed the holded element from the chan_list struct, we know this from the state already * added a few tweaks to make HOLD/RETRIEVE work again (TRANSFER does not work yet) * added possibility to debug mISDN frames via syslog * added misdn_lib_port_is_blocked function to check if a port is blocked * removed ec_training=1 from empty_bc, we don't use ec_training anymore * removed unused misdn_lib_get_l2_status function * added the nt bit to dummy misdn_bchannel objects * setting bc->out_fac_type to FACILITY_NONE defaultly * removed HANDLER_DEBUG stuff for better readability git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-07changed naming of mISDN channels, so that hinting works properChristian Richter
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39131 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-05Merged revisions 38903-38904 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r38903 | russell | 2006-08-05 01:07:39 -0400 (Sat, 05 Aug 2006) | 2 lines suppress a compiler warning about the usage of a potentially uninitialized variable ........ r38904 | russell | 2006-08-05 01:08:50 -0400 (Sat, 05 Aug 2006) | 10 lines Fix an issue that would cause a NewCallerID manager event to be generated before the channel's NewChannel event. This was due to a somewhat recent change that included using ast_set_callerid() where it wasn't before. This function should not be used in the channel driver "new" functions. (issue #7654, fixed by me) Also, fix a couple minor bugs in usecount handling. chan_iax2 could have increased the usecount but then returned an error. The place where chan_sip increased the usecount did not call ast_update_usecount() ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-03* removed pp_l2_check (fixed L2 bug in mISDNuser)Christian Richter
* added blocking flag to stack object. A port can be blocked/unblocked from the cli * added EVENT_PORT_ALARM to send alarm infos to the chan_misdn.c layer (later we can add a manager event for that) * added block_on_alarm option, to block the port whenever a ALARM occurs * added need_busy flag to indicate if we've sended a CONTROL_BUSY already * changed a bunch of cb_log(-1,..) to cb_log(0,..) due to funny behaviour in recent asterisk ast_log messages.. * fixed a few ETSI state violations, especially when finishing calls in different seldom states * changed debug levels a lot to make the log more readable in low debuglevels * some first fixes for the HOLD/RETRIEVE stuff (doesn't work totally still) * removed the PRECONNECTED state stuff * added cause 27 when we get a CLEANUP directly after a outgoing SETUP, this creates a CHANISUNAVAIL instead of a NOANSWER * removed the addr pointer from "misdn show stacks" that's not needed anymore and makes the output more unreadable * added cause saving on RELEASE/RELEASE_COMPLETE * set cause to 16 on prepare_bc * removed stack getting from ph_control functions, we don't really need it there * added beroec api git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19merge Russell's 'hold_handling' branch, finally implementing music-on-hold ↵Kevin P. Fleming
handling the way it was decided at AstriDevCon Europe 2006 (and the way people really want it to be) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-13added even more statefulness for sending out ↵Christian Richter
disconnect/release/release_complete messages. added support for incoming presentation/screening. fixed a bug that we generate TONE_EVENTS on hanguptone_indicatem, which caused asterisk to write blocking thread messages. added nodialtone option to prevent dialtone for always_immediate git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-11* Introducing a new way for the l1watcher thread using the ast_sched way. ↵Christian Richter
Now l1watcher timeouts can be configured separately for every portgroup. * added a signal handler to allow waking up the misdn task thread (that may sleep in a poll call) via misdn_tasks_wakeup(). * overlap_dial functionality implemented. * fixes a bug which leads to a segfault after reordering config elements in the enum or struct git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37382 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-10removed unnecessary locking, which might have created deadlocks. removed ↵Christian Richter
find_chan_by_l3id, since the l3id is not unique over all ports. removed automatic nt_stack reinitialization, since this creates segfaults. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37323 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06* removed tone_indicate, we genrate only the dialtone by ourself (and the ↵Christian Richter
hanguptone of course) * removed the state handling from release_chan, and simplified the ast_hangup/ast_queue_hangup stuff * added pp_l2_check option, for pp lines where the pbx does not initially gets the L2 up * simplified and fixed a bug in the pid generation code * fixed a bug in empty_chan, which might cause segfaults and memorry corruptions * added prepare_bc function, which is sort of the opposite of empty_bc git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37172 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-04removed the reloading of the ntdebug stuff, since this is a bit buggy, we ↵Christian Richter
only set it when loading chan_misdn for now. fixed a litle state problem when receiving RELEASE_COMPLETE. also we may only play tones to a NT when the extension does not match and such cases. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36941 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-03removed our own tone creation from misdn_indicate, we just return -1. Now we ↵Christian Richter
get a lot fewer blocked in thread blah warnings.. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-03added misdn show config description[s] to show all the possible misdn.conf ↵Christian Richter
settings with a description in the CLI git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36865 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-30added a bit logging, when we split the bridgeChristian Richter
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-29added better L2 handling for ptp, if it's down we don't try to call on that ↵Christian Richter
port in groupdial anymore, also we try to get it up then. Additionally added the configoptions ntdebugflags and ntdebugfile to debug the mISDNuser NT Stack (should have done that ages before..). isdn_lib.c compiles again. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-28moved a notice into a logChristian Richter
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-28fixed a few state problems when hanging up the call. also changed a few ↵Christian Richter
debug messages to higher log level git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36188 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-27fixes segfault on incoming call which is disconnected in Alerting stateChristian Richter
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-26* fixed the busy stateChristian Richter
* fixed tone handling after ast_hangup was called * optimized the tone_indication function * removed warnings in favour of log debugs * improved the round_robin method * added logs for channel setting/emptying * fixed channel forgot to set bug git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-21* added support for PID export/import to identify bridging in misdn_call alreadyChristian Richter
* fixed a few inband Alerting issues, sometimes we need to create alerting, some times it's inband * beautified the state debugging of misdn_hangup * removed "real" bchannel activating/deactivating in chan_misdn.c * fixed "round_robin" bug when there's only 1 port * added more informative prints when channel could not be created * changed some warnings to notices * reworked the whole bchannel state machine stuff, it is now like in the examples of mISDNuser and therefore a lot easier, and it is now harder to create bugs * bchannel_activate/deactivate is now only called in setup/cleanup bc, they may merge sometime * it is very important to setup/cleanup the bchannels under the correct conditions, especially in the NT Side we can only setup the bchannels when we send a Message! In the TE side we can only setup the bchannel when we received the channel of course git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-19when we get a disconnect, we should stop the tones on te side..Christian Richter
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-19we need to send DISCONNECT on Timeout in the ALERTING/PROCEEDING cases tooChristian Richter
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-18added TONE_HANGUP, also added Tone generation by mISDN_dsp for post hangup ↵Christian Richter
tones, therefore the TONE_X defines are in the isdn_lib.h now. changed a REALEASE to a DISCONNECT in NT Stack, to make tones available in that state. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-17* fixed bchannel cleaning race condition with new bchannel state (CLEAN_REQUEST)Christian Richter
* added early bridge-hook, so we know if we need to generate ringing or can take it from the far end chan_misdn channel (if available) * fixed the issue, that we may not activate the bchannel on PTMP, when we receive ALERTING/PROCEEDING/PROGRESS, only on CONNECT. There might be other PTMP devices and we might disturb their bchannel. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-08Fixed detection of dtmfs with bridged channels.Christian Richter
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33011 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07simplify autoconfig include mechanism (make tholo happy he can use lint ↵Kevin P. Fleming
again :-) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07changed the clean_up_bc function to work proper again. fixed the print with ↵Christian Richter
the conference nr. when bridged git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32779 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06added select before write to avoid deadlock on full buffer. added some ↵Christian Richter
defines for deadlock debugging. added code snippet for generating silence if we don't have data to write. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32524 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01added bearer capability reject support. we send release instead of ↵Christian Richter
disconnect in case we have no real channel yet. added support for Restarting channels added support for sending complete decoding. changed some log levels. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31324 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24added EVENT_NEW_CHANNEL. We change the channel name now when we got the real ↵Christian Richter
channel, also changed name generation to new stringfield api git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24fixed to early connect bug which came in yesterday.., also added the ↵Christian Richter
transmit of progress indicators through channel vars git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29938 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23added a l1watcher timeout, therefore removed the old behaviour of guessing ↵Christian Richter
the l1state. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23* export_ies uses now _VAR else the vars are not copied to the dest chanChristian Richter
* when receiving a connect from the NT Side we wait until we have the final l3id until we queue the answer to asterisk to avoid bridging conflicts * when not bridged to misdn we had a segfault after receiving the connect due to a strcasecmp bug.. this didn't happen before, cause we hadn't had the bridge before * cleanup of the bchannels is queued now, due to possible race conditions * added mISDN_clear_stack when cleaning the bchannel git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29667 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-22added callcounters for incoming and outgoing callsChristian Richter
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-17fixed bug that we've lost the orginator of the call.. now we can hear to ↵Christian Richter
disconnect indications again git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-16fixed very bad memory overwrite which leaded to segfaults on some systems. ↵Christian Richter
removed redundant buffer betweend mISDN reading thread and ast_read in favour of the already existing pipe, this clarifies the way a voice frame takes between mISDN and asterisk a lot. centralized debugging of NumberPlan. removed a compiler warning. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05Added option far_alerting. This option makes it possible to generate a ↵Christian Richter
Ringing on other channels if they feel that they should have inband ringing, but there is non in reality. I need this due to the fact that asterisk has not the possibility to transmit progress indicators thus chan_sip and others do not know wether they should generate a Rining tone themselves if they receive AST_CONTROL_RINGING.. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24879 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02use set_callerid to update callerid with prefixChristian Richter
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24177 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02returning 128 emtpy Frames instead of null frame. Christian Richter
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01Don't return stack pointers from functions (especially since the code will ↵Tilghman Lesher
attempt to free() them later) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23854 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29added an up-queue message mechanism to avoid buffer fillups in the kernel, ↵Christian Richter
also changed some strdups to ast_strdupa git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23443 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-24Thanks to the fine work of Russell Bryant and Dancho Lazarov, we now have ↵Kevin P. Fleming
autoconf and menuselect tools for Asterisk! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-17more module loader related fixesKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20963 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10fixed some issues, that appear at higher loadChristian Richter
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18835 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10we send nearly everytime a RELEASE, only if we for sure know, that it's a TE ↵Christian Richter
and we did create the call we don't to hear the Inband Info git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18800 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-08since the module API is changing, it's a good time to const-ify the ↵Kevin P. Fleming
description() and key() return values git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-07sorry litle mistakeChristian Richter
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-07git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18192 ↵Christian Richter
65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-07fixed a bridging-endless-loop also fixed the rdnis is not exported issueChristian Richter
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-05some final fixes for cpnChristian Richter
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17594 65c4cc65-6c06-0410-ace0-fbb531ad65f3